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]

3.4.5/4.0.2/4.1 PATCH: Run Ada testsuite with CONFIG_SHELL


I've observed that on Tru64 UNIX V4.0F, the Ada testsuite isn't run:
acats.sum contains

		=== acats support ===
Generating support files... done.
Compiling support files... done.

		=== acats tests ===
		=== acats Summary ===
# of expected passes		0
# of unexpected failures	0

Running run_all.sh with sh -x, it turned out that $# was set to 1, although
$* was empty, so the behavior was expected.

Here's a minimal testcase:

Makefile:

check-gnat:
	./run_acats $(CHAPTERS)

run_acats:

#!/bin/sh

echo "run_acats: \$# = [$#], \$* = [$*]"

exec ./run_all.sh "$@"

run_all.sh:

#!/bin/sh

echo "run_all.sh: \$# = [$#], \$* = [$*]"

On Tru64 UNIX V4.0F, make yields

/bin/sh ./run_acats 
run_acats: $# = [0], $* = []
run_all.sh: $# = [1], $* = []

while on V5.1B and elsewhere I get

/bin/sh ./run_acats 
run_acats: $# = [0], $* = []
run_all.sh: $# = [0], $* = []

It turns out that running run_acats with /bin/ksh instead fixes this, which
is what the following trivial patch does.  This allowed the Ada testsuite
to run on the 3.4 branch; I cannot currently test 4.0 and mainline due to
PR ada/18434, but the patch appears trivial and I'd like to apply there as
well once 4.0 reopens.

Ok for 3.4 and 4.0 branches and mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Thu Jun  9 20:24:34 2005  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* Make-lang.in (check-gnat): Run run_acats with $(SHELL).

Index: gcc/ada/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Make-lang.in,v
retrieving revision 1.101
diff -u -p -r1.101 Make-lang.in
--- gcc/ada/Make-lang.in	16 Mar 2005 06:03:48 -0000	1.101
+++ gcc/ada/Make-lang.in	9 Jun 2005 18:25:50 -0000
@@ -1,6 +1,6 @@
 # Top level -*- makefile -*- fragment for GNU Ada (GNAT).
 #   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-#   2003, 2004 Free Software Foundation, Inc.
+#   2003, 2004, 2005 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -813,7 +813,7 @@ ACATSDIR = $(TESTSUITEDIR)/ada/acats
 check-gnat:
 	test -d $(ACATSDIR) || mkdir -p $(ACATSDIR)
 	testdir=`cd ${srcdir}/${ACATSDIR}; ${PWD_COMMAND}`; \
-	export testdir; cd $(ACATSDIR); $${testdir}/run_acats $(CHAPTERS)
+	export testdir; cd $(ACATSDIR); $(SHELL) $${testdir}/run_acats $(CHAPTERS)
 
 .PHONY: check-gnat
 


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