Patchwork libgo patch committed: Change testsuite format

login
register
mail settings
Submitter Ian Taylor
Date Jan. 11, 2011, 11:37 p.m.
Message ID <mcrpqs3107u.fsf@google.com>
Download mbox | patch
Permalink /patch/78470/
State New
Headers show

Comments

Ian Taylor - Jan. 11, 2011, 11:37 p.m.
This patch to the libgo Makefile.am changes the default testsuite format
to be more like that of DejaGNU.  Bootstrapped and ran libgo testsuite
on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r 82f054b05d0e libgo/Makefile.am
--- a/libgo/Makefile.am	Tue Jan 11 10:58:51 2011 -0800
+++ b/libgo/Makefile.am	Tue Jan 11 15:32:23 2011 -0800
@@ -1316,13 +1316,15 @@ 
 	MAKE="$(MAKE)"; \
 	export MAKE; \
 	rm -f $@-log; \
-	echo -n "$(@D) " >$@-log 2>&1; \
 	prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
 	test "$${prefix}" != "." || prefix="$(@D)"; \
-	$(srcdir)/testsuite/gotest --dejagnu=$(use_dejagnu) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" >>$@-log 2>&1; \
-	x=$$?; \
-	cat $@-log; \
-	exit $$x
+	if $(srcdir)/testsuite/gotest --dejagnu=$(use_dejagnu) --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)"; \
+	  cat $@-log; \
+	  exit 1; \
+	fi
 
 # Build all packages before checking any.
 CHECK_DEPS = libgo.la libgobegin.a \