diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-31 16:11:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-31 16:11:56 +0000 |
commit | 34ccb9c02a5456699ec6e04c51ab4cd1c1550e31 (patch) | |
tree | a8a81023c02bf0ca1ec53e3527ba3febb0237cbc /libgo/Makefile.in | |
parent | 246428c2d410e0c196bb48f038128bd4cb082c43 (diff) | |
download | gcc-34ccb9c02a5456699ec6e04c51ab4cd1c1550e31.zip gcc-34ccb9c02a5456699ec6e04c51ab4cd1c1550e31.tar.gz gcc-34ccb9c02a5456699ec6e04c51ab4cd1c1550e31.tar.bz2 |
libgo: Generate DejaGNU like .sum and .log files for "make check".
From-SVN: r171791
Diffstat (limited to 'libgo/Makefile.in')
-rw-r--r-- | libgo/Makefile.in | 89 |
1 files changed, 67 insertions, 22 deletions
diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 16eb62b..06574e2 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -1877,17 +1877,22 @@ CHECK = \ export RUNTESTFLAGS; \ MAKE="$(MAKE)"; \ export MAKE; \ - rm -f $@-log; \ + rm -f $@-testlog; \ prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \ test "$${prefix}" != "." || prefix="$(@D)"; \ if test "$(use_dejagnu)" = "yes"; then \ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS); \ else \ - if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-log 2>&1; then \ + if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \ echo "PASS: $(@D)"; \ + echo "PASS: $(@D)" >> libgo.sum; \ + echo "PASS: $(@D)" >> $@-testlog; \ + cat $@-testlog >> libgo.log; \ else \ - echo "FAIL: $(@D)"; \ - cat $@-log; \ + echo "FAIL: $(@D)" >> $@-testlog; \ + cat $@-testlog; \ + echo "FAIL: $(@D)" >> libgo.sum; \ + cat $@-testlog >> libgo.log; \ exit 1; \ fi; \ fi @@ -1895,23 +1900,29 @@ CHECK = \ # Build all packages before checking any. CHECK_DEPS = libgo.la libgobegin.a \ - $(toolexeclib_DATA) \ - $(toolexeclibarchive_DATA) \ - $(toolexeclibcompress_DATA) \ - $(toolexeclibcontainer_DATA) \ - $(toolexeclibcrypto_DATA) \ - $(toolexeclibdebug_DATA) \ - $(toolexeclibencoding_DATA) \ - $(toolexeclibexp_DATA) \ $(toolexeclibgo_DATA) \ - $(toolexeclibhash_DATA) \ - $(toolexeclibhttp_DATA) \ - $(toolexeclibimage_DATA) \ - $(toolexeclibio_DATA) \ - $(toolexeclibos_DATA) \ - $(toolexeclibrpc_DATA) \ - $(toolexeclibruntime_DATA) \ - $(toolexeclibtesting_DATA) + $(toolexeclibgoarchive_DATA) \ + $(toolexeclibgocompress_DATA) \ + $(toolexeclibgocontainer_DATA) \ + $(toolexeclibgocrypto_DATA) \ + $(toolexeclibgocryptoopenpgp_DATA) \ + $(toolexeclibgodebug_DATA) \ + $(toolexeclibgoencoding_DATA) \ + $(toolexeclibgoexp_DATA) \ + $(toolexeclibgogo_DATA) \ + $(toolexeclibgohash_DATA) \ + $(toolexeclibgohttp_DATA) \ + $(toolexeclibgoimage_DATA) \ + $(toolexeclibgoindex_DATA) \ + $(toolexeclibgoio_DATA) \ + $(toolexeclibgomime_DATA) \ + $(toolexeclibgonet_DATA) \ + $(toolexeclibgoos_DATA) \ + $(toolexeclibgopath_DATA) \ + $(toolexeclibgorpc_DATA) \ + $(toolexeclibgoruntime_DATA) \ + $(toolexeclibgosync_DATA) \ + $(toolexeclibgotesting_DATA) # How to build a .gox file from a .lo file. @@ -2045,7 +2056,8 @@ TEST_PACKAGES = \ testing/quick/check \ testing/script/check -CLEANFILES = *.go *.gox goc2c *.c s-version +MOSTLYCLEAN_FILES = libgo.tail +CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -5314,11 +5326,44 @@ testing/quick.gox: testing/quick.lo testing/script.gox: testing/script.lo $(BUILDGOX) -check-recursive: $(TEST_PACKAGES) +check-am: + @rm -f libgo.sum libgo.log + @echo "Test Run By $${USER} on `date`" > libgo.sum + @echo "Native configuration is $(host_triplet)" >> libgo.sum + @echo >> libgo.sum + @echo " === libgo tests ===" >> libgo.sum + @echo >> libgo.sum + @echo "Schedule of variations:" >> libgo.sum + @echo " unix" >> libgo.sum + @echo >> libgo.sum + @echo "Running target unix" >> libgo.sum + @echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum + @cp libgo.sum libgo.log + @rm -f libgo.tail + @$(MAKE) -k $(TEST_PACKAGES); \ + status=$$?; \ + echo > libgo.tail; \ + echo " === libgo summary ===" >> libgo.tail; \ + echo >> libgo.tail; \ + p=`grep -c PASS libgo.sum`; \ + if test "$$p" != "0"; then \ + echo "# of expected passes $$p" >> libgo.tail; \ + fi; \ + p=`grep -c FAIL libgo.sum`; \ + if test "$$p" != "0"; then \ + echo "# of unexpected failures $$p" >> libgo.tail; \ + fi; \ + cat libgo.tail >> libgo.sum; \ + cat libgo.tail >> libgo.log; \ + echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \ + echo >> libgo.log; \ + echo "runtest completed at `date`" >> libgo.log; \ + exit $$status mostlyclean-local: find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f find . -name '*.$(OBJEXT)' -print | xargs rm -f + find . -name '*-testlog' -print | xargs rm -f clean-local: find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f |