summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 16:11:56 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-31 16:11:56 +0000
commitd35fc6b0388c1c8cecd415cda1ffd3a4736ae74f (patch)
treea8a81023c02bf0ca1ec53e3527ba3febb0237cbc /libgo
parentd6f0fa250fd41cdd85a536717a7ed542f87d57c5 (diff)
downloadgcc-d35fc6b0388c1c8cecd415cda1ffd3a4736ae74f.tar.gz
libgo: Generate DejaGNU like .sum and .log files for "make check".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am92
-rw-r--r--libgo/Makefile.in89
2 files changed, 136 insertions, 45 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index a2f2d547edf..23636c7ea21 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1547,40 +1547,51 @@ 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
# 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)
asn1/asn1.lo: $(go_asn1_files) bytes.gox fmt.gox io.gox os.gox reflect.gox \
strconv.gox strings.gox time.gox
@@ -3040,14 +3051,49 @@ TEST_PACKAGES = \
testing/quick/check \
testing/script/check
-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_FILES = libgo.tail
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
+
+CLEANFILES = *.go *.gox goc2c *.c s-version libgo.sum libgo.log
clean-local:
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
find . -name '*.a' -print | xargs rm -f
-
-CLEANFILES = *.go *.gox goc2c *.c s-version
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 16eb62bfb9d..06574e26899 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