[perl-Test-Assert] Run the release tests too
Paul Howarth
pghmcfc at fedoraproject.org
Fri Mar 9 15:59:22 UTC 2012
commit 69c4f9e9fdbca47b1a57f09b66c55e46cbde1595
Author: Paul Howarth <paul at city-fan.org>
Date: Fri Mar 9 15:36:59 2012 +0000
Run the release tests too
- Extract upstream tarball in a subdir to avoid interference with signature/
manifest tests
- BR: perl(File::Slurp)
- BR: perl(Test::CheckChanges)
- BR: perl(Test::Distribution)
- BR: perl(Test::Kwalitee)
- BR: perl(Test::MinimumVersion)
- BR: perl(Test::Perl::Critic)
- BR: perl(Test::Pod)
- BR: perl(Test::Pod::Coverage)
- BR: perl(Test::Signature)
- BR: perl(Test::Spelling), hunspell-en
perl-Test-Assert.spec | 74 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 72 insertions(+), 2 deletions(-)
---
diff --git a/perl-Test-Assert.spec b/perl-Test-Assert.spec
index 6692432..309c442 100644
--- a/perl-Test-Assert.spec
+++ b/perl-Test-Assert.spec
@@ -1,6 +1,6 @@
Name: perl-Test-Assert
Version: 0.0504
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Assertion methods for those who like JUnit
License: GPL+ or Artistic
Group: Development/Libraries
@@ -18,6 +18,17 @@ BuildRequires: perl(Symbol::Util) >= 0.0202
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Unit::Lite) >= 0.11
BuildRequires: perl(warnings)
+# Release test requirements
+BuildRequires: perl(File::Slurp)
+BuildRequires: perl(Test::CheckChanges)
+BuildRequires: perl(Test::Distribution)
+BuildRequires: perl(Test::Kwalitee)
+BuildRequires: perl(Test::MinimumVersion)
+BuildRequires: perl(Test::Perl::Critic)
+BuildRequires: perl(Test::Pod)
+BuildRequires: perl(Test::Pod::Coverage)
+BuildRequires: perl(Test::Signature)
+BuildRequires: perl(Test::Spelling), hunspell-en
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Avoid doc-file dependencies
@@ -28,19 +39,63 @@ This class provides a set of assertion methods useful for writing tests.
The API is based on JUnit4 and Test::Unit and the methods die on failure.
%prep
-%setup -q -n Test-Assert-%{version}
+%setup -q -c -n Test-Assert
+
+# Copy up documentation for convenience with %%doc
+cp -a Test-Assert-%{version}/{Changes,eg,LICENSE,README} .
%build
+cd Test-Assert-%{version}
perl Build.PL installdirs=vendor
./Build
+cd -
%install
+cd Test-Assert-%{version}
./Build install destdir=%{buildroot} create_packlist=0
+cd -
%{_fixperms} %{buildroot}
%check
+cd Test-Assert-%{version}
+
+# === MAIN TEST SUITE === #
+
./Build test
+# === RELEASE TESTS === #
+RELEASE_TESTS="$(echo xt/*.t)"
+
+# Don't run the copyright test as it will fail after the year of module release
+RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/copyright.t||')"
+
+# Don't run the spelling test yet as we need to add extra stopwords
+RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/pod_spell.t||')"
+
+# Signature test would fail on recent distros due to presence of MYMETA.*
+[ -f MYMETA.yml ] && mv MYMETA.yml ..
+[ -f MYMETA.json ] && mv MYMETA.json ..
+
+./Build test --test_files "$RELEASE_TESTS"
+
+# Put any MYMETA.* files back where they were
+[ -f ../MYMETA.yml ] && mv ../MYMETA.yml .
+[ -f ../MYMETA.json ] && mv ../MYMETA.json .
+
+# Fix the POD Spell test and run it
+mv xt/pod_spellrc xt/pod_spellrc.orig
+(
+ cat xt/pod_spellrc.orig
+ echo "'fail'"
+ echo "JUnit4"
+ echo "value1"
+ echo "value2"
+) > xt/pod_spellrc
+./Build test --test_files xt/pod_spell.t
+mv xt/pod_spellrc.orig xt/pod_spellrc
+
+cd -
+
%files
%doc Changes LICENSE README eg/
%{perl_vendorlib}/Exception/
@@ -49,6 +104,21 @@ perl Build.PL installdirs=vendor
%{_mandir}/man3/Test::Assert.3pm*
%changelog
+* Fri Mar 9 2012 Paul Howarth <paul at city-fan.org> - 0.0504-2
+- Run the release tests too
+ - Extract upstream tarball in a subdir to avoid interference with signature/
+ manifest tests
+ - BR: perl(File::Slurp)
+ - BR: perl(Test::CheckChanges)
+ - BR: perl(Test::Distribution)
+ - BR: perl(Test::Kwalitee)
+ - BR: perl(Test::MinimumVersion)
+ - BR: perl(Test::Perl::Critic)
+ - BR: perl(Test::Pod)
+ - BR: perl(Test::Pod::Coverage)
+ - BR: perl(Test::Signature)
+ - BR: perl(Test::Spelling), hunspell-en
+
* Fri Mar 9 2012 Paul Howarth <paul at city-fan.org> - 0.0504-1
- Update to 0.0504:
- Fixed error message for assert_deep_equals
More information about the scm-commits
mailing list