[gnulib] Add tests
Mosaab Alzoubi
moceap at fedoraproject.org
Tue Jul 1 20:45:49 UTC 2014
commit 7d96eeda5f8eb9e72fc82751b0de48ee439a838a
Author: Mosaab Alzoubi <moceap at hotmail.com>
Date: Tue Jul 1 23:45:14 2014 +0300
Add tests
gnulib.spec | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/gnulib.spec b/gnulib.spec
index b683fbc..2d24fe8 100644
--- a/gnulib.spec
+++ b/gnulib.spec
@@ -45,7 +45,7 @@ It can be used to improve portability and other functionality in your programs.
Name: gnulib
Version: 0
-Release: %{tag}.%{gitdate}git%{?dist}.1
+Release: %{tag}.%{gitdate}git%{?dist}.2
Summary: GNU Portability Library
Group: Development/System
License: Public Domain and BSD and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2 and LGPLv2+ and LGPLv3+
@@ -68,6 +68,18 @@ BuildRequires: help2man
%prep
%setup -q -n %{name}-%{githead}
+
+#modules not to be tested by direct import
+toRemove="lib-symbol-visibility havelib .*-obsolete localcharset gettext-h gettext alloca-opt alloca "
+
+list="$(./gnulib-tool --list)"
+for item in $toRemove
+do
+ list="$(echo $list| sed "s:\b$item\b::g")"
+done
+#is necessary to avoid some modules to test prep pass
+./gnulib-tool --create-testdir --with-tests --with-obsolete --avoid=alloca --avoid=lib-symbol-visibility --avoid=havelib --dir=build-tests $list
+
rm lib/javaversion.class
# MODULE #1 - git-merge-changelog
./gnulib-tool --create-testdir --dir=build-%{module1} %{module1}
@@ -78,6 +90,11 @@ pushd build-%{module1}
%configure --prefix=%_prefix
make %{?_smp_mflags}
popd
+#tests build
+pushd build-tests
+%configure --prefix=%_prefix
+make %{?_smp_mflags}
+popd
# Rebuild removed java class
javac -d lib -source 1.3 -target 1.3 lib/javaversion.java
# This part is done with the original path
@@ -93,6 +110,11 @@ rm -f */.gitattributes
rm -f lib/.cppi-disable
rm -f lib/uniname/gen-uninames.lisp
+%check
+pushd build-tests
+make check
+popd
+
%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}
@@ -194,6 +216,9 @@ It can be enabled for specific files by setting appropriate git attributes.
#-------------------------------------------------------------------------
%changelog
+* Fri Jun 27 2014 Jakub Čajka <jcajka at redhat.com> - 0-8.20140504git.2
+- Added tests
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0-8.20140504git.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list