public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: Timeout ACATS tests
@ 2009-09-02 12:36 Rainer Orth
  2009-09-02 12:39 ` Arnaud Charlet
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2009-09-02 12:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet, Laurent GUERBY

The following patch uses expect to allow the ACATS tests to time out just
like everything run with DejaGnu, as lately discussed in this thread:

	http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01479.html

I had to make some changes to this patch:

* I leave the I/O redirection at the call sites of target_run, where it
  belongs: this way, the shell does the redirection, the patch is less
  intrusive and copes with cases where target_run is invoked with more than
  one argument.

* The path to expect isn't hardcoded in run_test.exp, but uses the EXPECT
  environment variable instead.  To get this to work, we need an extra eval
  in target_run, since the makefiles set EXPECT to something like

EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
            echo $${rootme}/../expect/expect ; \
          else echo expect ; fi`

* For this to work, both rootme and EXPECT need to be exported in
  gcc-interface/Make-lang.in.

Since my Tru64 UNIX machines are not yet running again (I've recently moved
jobs), I couldn't test on them where several ACATS tests time out, but only
on sparc-sun-solaris2.11 and i386-pc-solaris2.10.  Due to other breakage, I
didn't have a proper baseline, though.  I'll try a proper regtest with my
recent libgfortran etc. fixes just now.

Ok for mainline if this passes?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Mon Jul 27 16:02:47 2009  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:

	PR ada/18302
	* ada/acats/run_all.sh (target_run): Use run_test.exp to execute
	commands.
	* ada/acats/run_test.exp: New file.
	
	gcc/ada:

	* gcc-interface/Make-lang.in (check-acats): Export rootme, EXPECT.

Index: ada/gcc-interface/Make-lang.in
===================================================================
--- ada/gcc-interface/Make-lang.in	(revision 151177)
+++ ada/gcc-interface/Make-lang.in	(working copy)
@@ -841,6 +841,8 @@
 
 check-acats:
 	@test -d $(ACATSDIR) || mkdir -p $(ACATSDIR); \
+	rootme=`${PWD_COMMAND}`; export rootme; \
+	EXPECT=$(EXPECT); export EXPECT; \
 	if [ -z "$(CHAPTERS)" ] && [ "$(filter -j, $(MFLAGS))" = "-j" ]; \
 	then \
 	  $(MAKE) $(check_acats_targets); \
Index: testsuite/ada/acats/run_all.sh
===================================================================
--- testsuite/ada/acats/run_all.sh	(revision 151177)
+++ testsuite/ada/acats/run_all.sh	(working copy)
@@ -13,7 +13,7 @@
 gnatflags="-gnatws"
 
 target_run () {
-$*
+  eval $EXPECT -f $testdir/run_test.exp $*
 }
 
 # End of customization section.
Index: testsuite/ada/acats/run_test.exp
===================================================================
--- testsuite/ada/acats/run_test.exp	(revision 0)
+++ testsuite/ada/acats/run_test.exp	(revision 0)
@@ -0,0 +1,13 @@
+#!/usr/bin/expect -f
+
+if {[info exists env(DEJAGNU_TIMEOUT)]} {
+    set timeout $env(DEJAGNU_TIMEOUT)
+} else {
+    set timeout 300 
+}
+
+spawn $argv
+expect timeout {
+    send_user "Program timed out.\n"
+    exit 1
+}

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Timeout ACATS tests
  2009-09-02 12:36 PATCH: Timeout ACATS tests Rainer Orth
@ 2009-09-02 12:39 ` Arnaud Charlet
  2009-09-02 14:46   ` Rainer Orth
  2009-09-10 20:42   ` Rainer Orth
  0 siblings, 2 replies; 5+ messages in thread
From: Arnaud Charlet @ 2009-09-02 12:39 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, Laurent GUERBY

> Since my Tru64 UNIX machines are not yet running again (I've recently moved
> jobs), I couldn't test on them where several ACATS tests time out, but only
> on sparc-sun-solaris2.11 and i386-pc-solaris2.10.  Due to other breakage, I
> didn't have a proper baseline, though.  I'll try a proper regtest with my
> recent libgfortran etc. fixes just now.
> 
> Ok for mainline if this passes?

Looks OK to me.

Arno

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Timeout ACATS tests
  2009-09-02 12:39 ` Arnaud Charlet
@ 2009-09-02 14:46   ` Rainer Orth
  2009-09-02 15:07     ` Laurent GUERBY
  2009-09-10 20:42   ` Rainer Orth
  1 sibling, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2009-09-02 14:46 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: gcc-patches, Laurent GUERBY

Arnaud Charlet writes:

> > Since my Tru64 UNIX machines are not yet running again (I've recently moved
> > jobs), I couldn't test on them where several ACATS tests time out, but only
> > on sparc-sun-solaris2.11 and i386-pc-solaris2.10.  Due to other breakage, I
> > didn't have a proper baseline, though.  I'll try a proper regtest with my
> > recent libgfortran etc. fixes just now.
> > 
> > Ok for mainline if this passes?
> 
> Looks OK to me.

Unfortunately, I cannot regtest mainline: due to PR bootstrap/41228 neither
Solaris/SPARC nor Solaris/x86 bootstrap for me currently.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Timeout ACATS tests
  2009-09-02 14:46   ` Rainer Orth
@ 2009-09-02 15:07     ` Laurent GUERBY
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent GUERBY @ 2009-09-02 15:07 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Arnaud Charlet, gcc-patches

Feel free to apply for a compile farm account, on the 8 core boxes
checking a patch is quite fast.

http://gcc.gnu.org/wiki/CompileFarm

Laurent

On Wed, 2009-09-02 at 16:46 +0200, Rainer Orth wrote:
> Arnaud Charlet writes:
> 
> > > Since my Tru64 UNIX machines are not yet running again (I've recently moved
> > > jobs), I couldn't test on them where several ACATS tests time out, but only
> > > on sparc-sun-solaris2.11 and i386-pc-solaris2.10.  Due to other breakage, I
> > > didn't have a proper baseline, though.  I'll try a proper regtest with my
> > > recent libgfortran etc. fixes just now.
> > > 
> > > Ok for mainline if this passes?
> > 
> > Looks OK to me.
> 
> Unfortunately, I cannot regtest mainline: due to PR bootstrap/41228 neither
> Solaris/SPARC nor Solaris/x86 bootstrap for me currently.
> 
> 	Rainer
> 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: Timeout ACATS tests
  2009-09-02 12:39 ` Arnaud Charlet
  2009-09-02 14:46   ` Rainer Orth
@ 2009-09-10 20:42   ` Rainer Orth
  1 sibling, 0 replies; 5+ messages in thread
From: Rainer Orth @ 2009-09-10 20:42 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: gcc-patches, Laurent GUERBY

Arnaud Charlet writes:

> > Since my Tru64 UNIX machines are not yet running again (I've recently moved
> > jobs), I couldn't test on them where several ACATS tests time out, but only
> > on sparc-sun-solaris2.11 and i386-pc-solaris2.10.  Due to other breakage, I
> > didn't have a proper baseline, though.  I'll try a proper regtest with my
> > recent libgfortran etc. fixes just now.
> > 
> > Ok for mainline if this passes?
> 
> Looks OK to me.

A proper regtest revealed one necessary change: in run_test.exp, spawn
needs to be invoked with -noecho, otherwise the command prints

spawn $argv

which interferes with some tests.

This is what I've checked in.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2009-09-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	    James A. Morrison  <phython@gcc.gnu.org>

	gcc/testsuite:

	PR ada/18302
	* ada/acats/run_all.sh (target_run): Use run_test.exp to execute
	commands.
	* ada/acats/run_test.exp: New file.

2009-09-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/ada:

	PR ada/18302
	* gcc-interface/Make-lang.in (check-acats): Export rootme, EXPECT.

Index: testsuite/ada/acats/run_all.sh
===================================================================
--- testsuite/ada/acats/run_all.sh	(revision 151613)
+++ testsuite/ada/acats/run_all.sh	(revision 151614)
@@ -13,7 +13,7 @@
 gnatflags="-gnatws"
 
 target_run () {
-$*
+  eval $EXPECT -f $testdir/run_test.exp $*
 }
 
 # End of customization section.
Index: testsuite/ada/acats/run_test.exp
===================================================================
--- testsuite/ada/acats/run_test.exp	(revision 0)
+++ testsuite/ada/acats/run_test.exp	(revision 151614)
@@ -0,0 +1,13 @@
+#!/usr/bin/expect -f
+
+if {[info exists env(DEJAGNU_TIMEOUT)]} {
+    set timeout $env(DEJAGNU_TIMEOUT)
+} else {
+    set timeout 300 
+}
+
+spawn -noecho $argv
+expect timeout {
+    send_user "Program timed out.\n"
+    exit 1
+}
Index: ada/gcc-interface/Make-lang.in
===================================================================
--- ada/gcc-interface/Make-lang.in	(revision 151613)
+++ ada/gcc-interface/Make-lang.in	(revision 151614)
@@ -841,6 +841,8 @@
 
 check-acats:
 	@test -d $(ACATSDIR) || mkdir -p $(ACATSDIR); \
+	rootme=`${PWD_COMMAND}`; export rootme; \
+	EXPECT=$(EXPECT); export EXPECT; \
 	if [ -z "$(CHAPTERS)" ] && [ "$(filter -j, $(MFLAGS))" = "-j" ]; \
 	then \
 	  $(MAKE) $(check_acats_targets); \

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-10 20:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-02 12:36 PATCH: Timeout ACATS tests Rainer Orth
2009-09-02 12:39 ` Arnaud Charlet
2009-09-02 14:46   ` Rainer Orth
2009-09-02 15:07     ` Laurent GUERBY
2009-09-10 20:42   ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).