[ksh] - ksh updated to 2010-08-26 - make regression test suite usable during package build
Michal Hlavinka
mhlavink at fedoraproject.org
Mon Aug 30 17:38:50 UTC 2010
commit 67ef81e4519661e2d03c92163828b020154c1d0f
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Mon Aug 30 19:38:48 2010 +0200
- ksh updated to 2010-08-26
- make regression test suite usable during package build
ksh.spec | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 deletions(-)
---
diff --git a/ksh.spec b/ksh.spec
index 2849321..0780169 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -11,10 +11,15 @@ Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedat
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source3: kshrc.rhs
Source4: dotkshrc
+#expected results of test suite
+Source5: expectedresults.log
-#don't use not wanted/needed builtins - Fedora specific
+#don't use not wanted/needed builtins - Fedora/RHEL specific
Patch1: ksh-20070328-builtins.patch
+#fix regression test suite to be usable during packagebuild - Fedora/RHEL specific
+Patch2: ksh-20100826-fixregr.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
Requires: coreutils, glibc-common, diffutils
@@ -32,18 +37,20 @@ with "sh" (the Bourne Shell).
%setup -q -c
%setup -q -T -D -a 1
%patch1 -p1 -b .builtins
+%patch2 -p1 -b .fixregr
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
%build
-./bin/package "read" ||:
+./bin/package
+./bin/package make mamake ||:
+./bin/package make mamake ||:
export CCFLAGS="$RPM_OPT_FLAGS"
export CC=gcc
./bin/package "make"
-#missing in 2010-06-21, chech later if added back
-#cp lib/package/LICENSES/ast LICENSE
+cp lib/package/LICENSES/ast LICENSE
%install
rm -rf $RPM_BUILD_ROOT
@@ -55,6 +62,18 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/skel
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.kshrc
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc
+%check
+export SHELL=$(ls $(pwd)/arch/*/bin/ksh)
+cd src/cmd/ksh93/tests/
+ulimit -c unlimited
+$SHELL ./shtests 2>&1 | tee testresults.log
+sed -e '/begins at/d' -e '/ 0 error/d' -e 's/at [^\[]*\[/\[/' testresults.log -e '/tests skipped/d' >filteredresults.log
+if ! cmp filteredresults.log %{SOURCE5} >/dev/null || ls core.*
+then
+ echo "Regression tests failed"
+ exit -1
+fi
+
%post
if [ ! -f /etc/shells ]; then
echo "/bin/ksh" > /etc/shells
@@ -80,8 +99,7 @@ fi
%files
%defattr(-, root, root,-)
-#%doc README LICENSE
-%doc README
+%doc README LICENSE
/bin/ksh
/usr/bin/shcomp
%{_mandir}/man1/*
@@ -94,7 +112,7 @@ fi
%changelog
* Mon Aug 30 2010 Michal Hlavinka <mhlavink at redhat.com> - 20100826-1
- ksh updated to 2010-08-26
-
+- make regression test suite usable during package build
* Fri Aug 13 2010 Michal Hlavinka <mhlavink at redhat.com> - 20100811-1
- ksh updated to 2010-08-11
More information about the scm-commits
mailing list