Patchwork [libgo] Run gotest with $SHELL

login
register
mail settings
Submitter Rainer Orth
Date Jan. 14, 2011, 4:24 p.m.
Message ID <ydd7he7pi5y.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/78952/
State New
Headers show

Comments

Rainer Orth - Jan. 14, 2011, 4:24 p.m.
Currently, testsuite/gotest is run with whatever /bin/sh on the given
system happens to be.  When bootstrapping with Go on Solaris 10, /bin/sh
complains

/vol/gcc/src/hg/trunk/solaris/libgo/testsuite/gotest: LC_ALL=C: is not an identi
fier
/vol/gcc/src/hg/trunk/solaris/libgo/testsuite/gotest: syntax error at line 209: 
`gofiles=$' unexpected

This can be avoided by running gotest with $SHELL explicitly, as the
following patch does.

Ok for mainline?

	Rainer


2011-01-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* Makefile.am (CHECK): Run gotest with $(SHELL).
	* Makefile.in: Regenerate.
Ian Taylor - Jan. 14, 2011, 7:13 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> 2011-01-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* Makefile.am (CHECK): Run gotest with $(SHELL).
> 	* Makefile.in: Regenerate.

Committed.

Thanks.

Ian

Patch

diff -r 6c184227ca86 libgo/Makefile.am
--- a/libgo/Makefile.am	Fri Jan 14 10:25:46 2011 +0100
+++ b/libgo/Makefile.am	Fri Jan 14 17:13:20 2011 +0100
@@ -1305,9 +1305,9 @@ 
 	prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
 	test "$${prefix}" != "." || prefix="$(@D)"; \
 	if test "$(use_dejagnu)" = "yes"; then \
-	  $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)"; \
+	  $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)"; \
 	else \
-	  if $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" >>$@-log 2>&1; then \
+	  if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" >>$@-log 2>&1; then \
 	    echo "PASS: $(@D)"; \
 	  else \
 	    echo "FAIL: $(@D)"; \