Invent ugly, convoluted way to run dejagnu testsuite in mock (where there
is no terminal).
This commit is contained in:
parent
079cceaec6
commit
31b394f044
13
dejagnu.spec
13
dejagnu.spec
@ -10,7 +10,7 @@ URL: http://www.gnu.org/software/dejagnu/
|
|||||||
Requires: expect
|
Requires: expect
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: expect
|
BuildRequires: expect screen
|
||||||
Patch1: dejagnu-1.4.4-smp-1.patch
|
Patch1: dejagnu-1.4.4-smp-1.patch
|
||||||
Patch2: dejagnu-1.4.4-no-info.patch
|
Patch2: dejagnu-1.4.4-no-info.patch
|
||||||
Patch3: dejagnu-1.4.4-testsuite.patch
|
Patch3: dejagnu-1.4.4-testsuite.patch
|
||||||
@ -34,8 +34,17 @@ into software development).
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
echo ============TESTING===============
|
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===========
|
echo ============END TESTING===========
|
||||||
|
exit $RESULT
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user