mirror of git://gcc.gnu.org/git/gcc.git
libgo: Generate DejaGNU like .sum and .log files for "make check".
From-SVN: r171791
This commit is contained in:
parent
246428c2d4
commit
34ccb9c02a
|
|
@ -1547,40 +1547,51 @@ CHECK = \
|
||||||
export RUNTESTFLAGS; \
|
export RUNTESTFLAGS; \
|
||||||
MAKE="$(MAKE)"; \
|
MAKE="$(MAKE)"; \
|
||||||
export MAKE; \
|
export MAKE; \
|
||||||
rm -f $@-log; \
|
rm -f $@-testlog; \
|
||||||
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
|
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
|
||||||
test "$${prefix}" != "." || prefix="$(@D)"; \
|
test "$${prefix}" != "." || prefix="$(@D)"; \
|
||||||
if test "$(use_dejagnu)" = "yes"; then \
|
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); \
|
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS); \
|
||||||
else \
|
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)"; \
|
||||||
|
echo "PASS: $(@D)" >> libgo.sum; \
|
||||||
|
echo "PASS: $(@D)" >> $@-testlog; \
|
||||||
|
cat $@-testlog >> libgo.log; \
|
||||||
else \
|
else \
|
||||||
echo "FAIL: $(@D)"; \
|
echo "FAIL: $(@D)" >> $@-testlog; \
|
||||||
cat $@-log; \
|
cat $@-testlog; \
|
||||||
|
echo "FAIL: $(@D)" >> libgo.sum; \
|
||||||
|
cat $@-testlog >> libgo.log; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build all packages before checking any.
|
# Build all packages before checking any.
|
||||||
CHECK_DEPS = libgo.la libgobegin.a \
|
CHECK_DEPS = libgo.la libgobegin.a \
|
||||||
$(toolexeclib_DATA) \
|
|
||||||
$(toolexeclibarchive_DATA) \
|
|
||||||
$(toolexeclibcompress_DATA) \
|
|
||||||
$(toolexeclibcontainer_DATA) \
|
|
||||||
$(toolexeclibcrypto_DATA) \
|
|
||||||
$(toolexeclibdebug_DATA) \
|
|
||||||
$(toolexeclibencoding_DATA) \
|
|
||||||
$(toolexeclibexp_DATA) \
|
|
||||||
$(toolexeclibgo_DATA) \
|
$(toolexeclibgo_DATA) \
|
||||||
$(toolexeclibhash_DATA) \
|
$(toolexeclibgoarchive_DATA) \
|
||||||
$(toolexeclibhttp_DATA) \
|
$(toolexeclibgocompress_DATA) \
|
||||||
$(toolexeclibimage_DATA) \
|
$(toolexeclibgocontainer_DATA) \
|
||||||
$(toolexeclibio_DATA) \
|
$(toolexeclibgocrypto_DATA) \
|
||||||
$(toolexeclibos_DATA) \
|
$(toolexeclibgocryptoopenpgp_DATA) \
|
||||||
$(toolexeclibrpc_DATA) \
|
$(toolexeclibgodebug_DATA) \
|
||||||
$(toolexeclibruntime_DATA) \
|
$(toolexeclibgoencoding_DATA) \
|
||||||
$(toolexeclibtesting_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 \
|
asn1/asn1.lo: $(go_asn1_files) bytes.gox fmt.gox io.gox os.gox reflect.gox \
|
||||||
strconv.gox strings.gox time.gox
|
strconv.gox strings.gox time.gox
|
||||||
|
|
@ -3040,14 +3051,49 @@ TEST_PACKAGES = \
|
||||||
testing/quick/check \
|
testing/quick/check \
|
||||||
testing/script/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:
|
mostlyclean-local:
|
||||||
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
||||||
find . -name '*.$(OBJEXT)' -print | xargs 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:
|
clean-local:
|
||||||
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
||||||
find . -name '*.a' -print | xargs rm -f
|
find . -name '*.a' -print | xargs rm -f
|
||||||
|
|
||||||
CLEANFILES = *.go *.gox goc2c *.c s-version
|
|
||||||
|
|
|
||||||
|
|
@ -1877,17 +1877,22 @@ CHECK = \
|
||||||
export RUNTESTFLAGS; \
|
export RUNTESTFLAGS; \
|
||||||
MAKE="$(MAKE)"; \
|
MAKE="$(MAKE)"; \
|
||||||
export MAKE; \
|
export MAKE; \
|
||||||
rm -f $@-log; \
|
rm -f $@-testlog; \
|
||||||
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
|
prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
|
||||||
test "$${prefix}" != "." || prefix="$(@D)"; \
|
test "$${prefix}" != "." || prefix="$(@D)"; \
|
||||||
if test "$(use_dejagnu)" = "yes"; then \
|
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); \
|
$(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS); \
|
||||||
else \
|
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)"; \
|
||||||
|
echo "PASS: $(@D)" >> libgo.sum; \
|
||||||
|
echo "PASS: $(@D)" >> $@-testlog; \
|
||||||
|
cat $@-testlog >> libgo.log; \
|
||||||
else \
|
else \
|
||||||
echo "FAIL: $(@D)"; \
|
echo "FAIL: $(@D)" >> $@-testlog; \
|
||||||
cat $@-log; \
|
cat $@-testlog; \
|
||||||
|
echo "FAIL: $(@D)" >> libgo.sum; \
|
||||||
|
cat $@-testlog >> libgo.log; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
|
@ -1895,23 +1900,29 @@ CHECK = \
|
||||||
|
|
||||||
# Build all packages before checking any.
|
# Build all packages before checking any.
|
||||||
CHECK_DEPS = libgo.la libgobegin.a \
|
CHECK_DEPS = libgo.la libgobegin.a \
|
||||||
$(toolexeclib_DATA) \
|
|
||||||
$(toolexeclibarchive_DATA) \
|
|
||||||
$(toolexeclibcompress_DATA) \
|
|
||||||
$(toolexeclibcontainer_DATA) \
|
|
||||||
$(toolexeclibcrypto_DATA) \
|
|
||||||
$(toolexeclibdebug_DATA) \
|
|
||||||
$(toolexeclibencoding_DATA) \
|
|
||||||
$(toolexeclibexp_DATA) \
|
|
||||||
$(toolexeclibgo_DATA) \
|
$(toolexeclibgo_DATA) \
|
||||||
$(toolexeclibhash_DATA) \
|
$(toolexeclibgoarchive_DATA) \
|
||||||
$(toolexeclibhttp_DATA) \
|
$(toolexeclibgocompress_DATA) \
|
||||||
$(toolexeclibimage_DATA) \
|
$(toolexeclibgocontainer_DATA) \
|
||||||
$(toolexeclibio_DATA) \
|
$(toolexeclibgocrypto_DATA) \
|
||||||
$(toolexeclibos_DATA) \
|
$(toolexeclibgocryptoopenpgp_DATA) \
|
||||||
$(toolexeclibrpc_DATA) \
|
$(toolexeclibgodebug_DATA) \
|
||||||
$(toolexeclibruntime_DATA) \
|
$(toolexeclibgoencoding_DATA) \
|
||||||
$(toolexeclibtesting_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.
|
# How to build a .gox file from a .lo file.
|
||||||
|
|
@ -2045,7 +2056,8 @@ TEST_PACKAGES = \
|
||||||
testing/quick/check \
|
testing/quick/check \
|
||||||
testing/script/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
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
|
|
@ -5314,11 +5326,44 @@ testing/quick.gox: testing/quick.lo
|
||||||
testing/script.gox: testing/script.lo
|
testing/script.gox: testing/script.lo
|
||||||
$(BUILDGOX)
|
$(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:
|
mostlyclean-local:
|
||||||
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
||||||
find . -name '*.$(OBJEXT)' -print | xargs rm -f
|
find . -name '*.$(OBJEXT)' -print | xargs rm -f
|
||||||
|
find . -name '*-testlog' -print | xargs rm -f
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue