Name: perl-Test-Directory Version: 0.052 Release: 4%{?dist} Summary: Perl extension for maintaining test directories License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Test-Directory Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-Directory-%{version}.tar.gz BuildArch: noarch BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(:VERSION) >= 5.6.2 BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # Run-time: BuildRequires: perl(Carp) BuildRequires: perl(Fcntl) BuildRequires: perl(File::Spec) BuildRequires: perl(File::Temp) BuildRequires: perl(strict) BuildRequires: perl(Test::Builder::Module) BuildRequires: perl(warnings) # Tests: BuildRequires: perl(constant) BuildRequires: perl(lib) BuildRequires: perl(Test::Builder::Tester) BuildRequires: perl(Test::Exception) BuildRequires: perl(Test::More) %description Testing code can involve making sure that files are created and deleted as expected. Doing this manually can be error prone, as it's easy to forget a file, or miss that some unexpected file was added. This module simplifies maintaining test directories by tracking their status as they are modified or tested with this API, making it simple to test both individual files, as well as to verify that there are no missing or unknown files. %package tests Summary: Tests for %{name} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: coreutils Requires: perl-Test-Harness %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep %autosetup -p1 -n Test-Directory-%{version} # Help generators to recognize Perl scripts for F in t/*.t; do perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" chmod +x "$F" done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install %{make_install} %{_fixperms} %{buildroot}/* # Install tests mkdir -p %{buildroot}%{_libexecdir}/%{name} cp -a README t %{buildroot}%{_libexecdir}/%{name} cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' #!/bin/sh set -e # Many tests write into CWD DIR=$(mktemp -d) cp -a %{_libexecdir}/%{name}/* "$DIR" pushd "$DIR" prove -I . -j "$(getconf _NPROCESSORS_ONLN)" popd rm -r "$DIR" EOF chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files %doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %files tests %{_libexecdir}/%{name} %changelog * Thu Jan 25 2024 Fedora Release Engineering - 0.052-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.052-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.052-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Feb 27 2023 Petr Pisar - 0.052-1 - 0.052 bump - Package the tests * Fri Jan 20 2023 Fedora Release Engineering - 0.051-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.051-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue May 31 2022 Jitka Plesnikova - 0.051-9 - Perl 5.36 rebuild * Fri Jan 21 2022 Fedora Release Engineering - 0.051-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 0.051-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri May 21 2021 Jitka Plesnikova - 0.051-6 - Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 0.051-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.051-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 23 2020 Jitka Plesnikova - 0.051-3 - Perl 5.32 rebuild * Thu Jan 30 2020 Fedora Release Engineering - 0.051-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Sep 25 2019 Petr Pisar - 0.051-1 - 0.051 bump * Mon Sep 23 2019 Petr Pisar - 0.050-1 - 0.050 bump * Fri Jul 26 2019 Fedora Release Engineering - 0.041-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri May 31 2019 Jitka Plesnikova - 0.041-8 - Perl 5.30 rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.041-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.041-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Jun 28 2018 Jitka Plesnikova - 0.041-5 - Perl 5.28 rebuild * Fri Feb 09 2018 Fedora Release Engineering - 0.041-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.041-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sun Jun 04 2017 Jitka Plesnikova - 0.041-2 - Perl 5.26 rebuild * Fri Apr 21 2017 Petr Pisar 0.041-1 - Specfile autogenerated by cpanspec 1.78.