rpms/dejagnu/devel dejagnu.spec,1.4,1.5

Petr Machata (pmachata) fedora-extras-commits at redhat.com
Wed Oct 3 21:48:23 UTC 2007


Author: pmachata

Update of /cvs/pkgs/rpms/dejagnu/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3217

Modified Files:
	dejagnu.spec 
Log Message:
Invent ugly, convoluted way to run dejagnu testsuite in mock (where there is no terminal).



Index: dejagnu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dejagnu/devel/dejagnu.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dejagnu.spec	3 Oct 2007 16:42:49 -0000	1.4
+++ dejagnu.spec	3 Oct 2007 21:47:51 -0000	1.5
@@ -10,7 +10,7 @@
 Requires: expect
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
-BuildRequires: expect
+BuildRequires: expect screen
 Patch1: dejagnu-1.4.4-smp-1.patch
 Patch2: dejagnu-1.4.4-no-info.patch
 Patch3: dejagnu-1.4.4-testsuite.patch
@@ -34,8 +34,17 @@
 
 %check
 echo ============TESTING===============
-make check RUNTESTFLAGS="RUNTEST=`pwd`/runtest"
+# Dejagnu needs to report to user occasionally, and it needs a
+# terminal for that.  That doesn't compute in mock.  Work around it by
+# running the test under screen and communicating back to test runner
+# via temporary file.  If you come with better method, please do tell.
+TMP=`mktemp` || exit 1
+screen -D -m sh -c '(make check RUNTESTFLAGS="RUNTEST=`pwd`/runtest"; echo $?) >> '$TMP
+RESULT=`tail -n 1 $TMP`
+[ $RESULT != 0 ] && cat $TMP
+rm -f $TMP
 echo ============END TESTING===========
+exit $RESULT
 
 %install
 rm -rf $RPM_BUILD_ROOT




More information about the scm-commits mailing list