diff --git a/dejagnu.spec b/dejagnu.spec index 39eed5a..4925956 100644 --- a/dejagnu.spec +++ b/dejagnu.spec @@ -10,7 +10,7 @@ URL: http://www.gnu.org/software/dejagnu/ 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 @@ into software development). %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