This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] Run ACATS tests through an expect script


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Sun, 28 Nov 2004, James A. Morrison wrote:
> 
> >   The following patch runs the acats tests through an expect script so tests
> > will time out if they are taking too long.  I'm running acats now on
> > powerpc-linux, so far only c37402a has timed out and all the other tests have
> > run normally up to chapter c4.
> 
> You should use the same copy of expect as the other testsuites use - 
> EXPECT in gcc/Makefile.in - rather than presuming it can be found in a 
> fixed location.

 Good point.  Fixed in the attached patch.

-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim

Index: ada/Make-lang.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.96
diff -u -r1.96 Make-lang.in
--- ada/Make-lang.in	27 Nov 2004 01:53:46 -0000	1.96
+++ ada/Make-lang.in	28 Nov 2004 22:37:59 -0000
@@ -845,7 +845,8 @@
 
 check-gnat:
 	test -d $(ACATSDIR) || mkdir -p $(ACATSDIR)
 	testdir=`cd ${srcdir}/${ACATSDIR}; ${PWD_COMMAND}`; \
+	EXPECT=${EXPECT} ; export EXPECT ; \
 	export testdir; cd $(ACATSDIR); $${testdir}/run_acats $(CHAPTERS)
 
 .PHONY: check-gnat
Index: testsuite/ada/acats/run_all.sh
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/ada/acats/run_all.sh,v
retrieving revision 1.18
diff -u -r1.18 run_all.sh
--- testsuite/ada/acats/run_all.sh	26 Apr 2004 21:15:54 -0000	1.18
+++ testsuite/ada/acats/run_all.sh	28 Nov 2004 22:37:59 -0000
@@ -13,7 +13,7 @@
 gnatflags="-gnatws"
 
 target_run () {
-$*
+	$EXPECT -f $testdir/run_test.exp $1 > $2
 }
 
 # End of customization section.
@@ -92,7 +92,7 @@
 
 # Find out the size in bit of an address on the target
 target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
-target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
+target_run $dir/support/impbit $dir/support/impbit.out
 target_bit=`cat $dir/support/impbit.out`
 echo target_bit="$target_bit" >> $dir/acats.log
 
@@ -256,7 +256,7 @@
 
       echo "RUN $binmain" >> $dir/acats.log
       cd $dir/run
-      target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
+      target_run $dir/tests/$chapter/$i/$binmain $dir/tests/$chapter/$i/${i}.log
       cd $dir/tests/$chapter/$i
       cat ${i}.log >> $dir/acats.log
       egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1

Attachment: run_test.exp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]