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: PING: [Ada] Run ACATS tests through an expect script


Andreas on ia64 is using the following Bourne Shell magic
to kill runaway tests.

Laurent

Index: gcc/testsuite/ada/acats/run_all.sh
===================================================================
RCS file: /backup/gcc-cvs/gcc/gcc/testsuite/ada/acats/run_all.sh,v
retrieving revision 1.18
diff -u -p -a -r1.18 run_all.sh
--- gcc/testsuite/ada/acats/run_all.sh  26 Apr 2004 21:15:54
-0000      1.18
+++ gcc/testsuite/ada/acats/run_all.sh  5 Dec 2004 15:58:13 -0000
@@ -11,9 +11,16 @@
 
 gccflags="-O2"
 gnatflags="-gnatws"
+timeout=120
 
 target_run () {
+  sh -c "(sleep $timeout; kill \$\$) &
+x=\$!
 $*
+s=\$?
+kill \$x
+exit \$s
+"
 }
 
 # End of customization section.

On Mon, 2004-12-06 at 12:36, Arnaud Charlet wrote:
> >  PING: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02484.html
> >         PR ada/18302
> >         * Make-lang.in (check-gnat): Set EXPECT environment variable.
> > 
> > testsuite:
> >         PR ada/18302
> >         * ada/acats/run_all.sh (target_run): Run test through run_test.expect.
> >         * ada/acats/run_test.expect: Expect script for ACATS tests.
> 
> It's not really my area of expertise, so I'll just make one comment:
> it is currently very convenient to be able to do a make check-ada without
> having to have a full dejagnu set up, in particular on exotic platforms.
> 
> So it would be great if no expect/dejagnu were used if none is found, and
> only use expect if available.
> 
> Arno
> 


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