21540785 Some more Userland components should have their system-test targets hooked up
authorRich Burridge <rich.burridge@oracle.com>
Mon, 03 Aug 2015 15:20:18 -0700
changeset 4732 d072001cb0ea
parent 4731 88830c57334b
child 4733 87d0de8972c0
21540785 Some more Userland components should have their system-test targets hooked up
components/gzip/Makefile
components/gzip/test/results-64.master
components/sed/Makefile
components/sed/test/results-64.master
components/text-utilities/Makefile
components/tidy/Makefile
components/tidy/patches/system-test.patch
components/wdiff/Makefile
components/wdiff/test/results-64.master
--- a/components/gzip/Makefile	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/gzip/Makefile	Mon Aug 03 15:20:18 2015 -0700
@@ -56,10 +56,6 @@
 
 COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR); $(AUTORECONF) -if)
 
-# Get the binaries to test from the component build area.
-COMPONENT_TEST_ENV +=	PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin
-COMPONENT_TEST_TARGETS = check
-
 # Fix references to Solaris renamed programs (z*->gz*) in man pages, info
 # pages and in wrapper scripts.
 COMPONENT_PRE_INSTALL_ACTION = \
@@ -86,6 +82,17 @@
 $(GZGREP_MAN_VARIANTS):
 	$(RM) $@; echo ".so man1/gzgrep.1" > $@
 
+# Get the binaries to test from the component build area.
+COMPONENT_TEST_ENV +=	PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin
+
+# Use the installed gzip binary from /usr/bin.
+COMPONENT_SYSTEM_TEST_ENV +=	PATH=/usr/xpg4/bin:/usr/bin
+
+COMPONENT_TEST_TRANSFORMS += \
+	'-n ' \
+	'-e "/PASS/p" ' \
+	'-e "/FAIL/p" '
+
 ASLR_MODE = $(ASLR_ENABLE)
 
 configure:	$(CONFIGURE_64)
@@ -96,7 +103,7 @@
 
 test:		$(TEST_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    configure $(SYSTEM_TEST_64)
 
 
 REQUIRED_PACKAGES += runtime/python-26
--- a/components/gzip/test/results-64.master	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/gzip/test/results-64.master	Mon Aug 03 15:20:18 2015 -0700
@@ -1,57 +1,3 @@
-make[1]: Entering directory `$(@D)'
-  GEN    public-submodule-commit
-/usr/gnu/bin/make  check-recursive
-make[2]: Entering directory `$(@D)'
-Making check in lib
-make[3]: Entering directory `$(@D)/lib'
-/usr/gnu/bin/make  check-am
-make[4]: Entering directory `$(@D)/lib'
-make[4]: Leaving directory `$(@D)/lib'
-make[3]: Leaving directory `$(@D)/lib'
-Making check in doc
-make[3]: Entering directory `$(@D)/doc'
-make[3]: Nothing to be done for `check'.
-make[3]: Leaving directory `$(@D)/doc'
-Making check in .
-make[3]: Entering directory `$(@D)'
-/usr/gnu/bin/make  check-local
-make[4]: Entering directory `$(@D)'
-  GEN    gzip.doc.gz
-{ test '$(SOURCE_DIR)' != . || ./zdiff --__bindir . -c gzip.doc.gz; }
-./zdiff --__bindir . -c $(SOURCE_DIR)/gzip.doc $(SOURCE_DIR)/gzip.doc
-No differences encountered
-./zdiff --__bindir . $(SOURCE_DIR)/gzip.doc gzip.doc.gz
-./zdiff --__bindir . -c - $(SOURCE_DIR)/gzip.doc <gzip.doc.gz
-No differences encountered
-./zdiff --__bindir . -c gzip.doc.gz gzip.doc.gz
-No differences encountered
-./zgrep --__bindir . -iV >/dev/null
-for file in gunzip gzexe zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew $(SOURCE_DIR)/ChangeLog $(SOURCE_DIR)/configure $(SOURCE_DIR)/gzip.c; do \
-  ./gzip -cv -- "$file" | ./gzip -d | cmp - "$file" || exit 1; \
-done
-gunzip:	 50.1%
-gzexe:	 60.6%
-zcat:	 49.2%
-zcmp:	 48.2%
-zdiff:	 66.6%
-zegrep:	 18.4%
-zfgrep:	 18.4%
-zforce:	 48.2%
-zgrep:	 59.9%
-zless:	 46.8%
-zmore:	 53.8%
-znew:	 58.9%
-$(SOURCE_DIR)/ChangeLog:	 67.3%
-$(SOURCE_DIR)/configure:	 81.7%
-$(SOURCE_DIR)/gzip.c:	 71.7%
-Test succeeded.
-make[4]: Leaving directory `$(@D)'
-make[3]: Leaving directory `$(@D)'
-Making check in tests
-make[3]: Entering directory `$(@D)/tests'
-/usr/gnu/bin/make  check-TESTS
-make[4]: Entering directory `$(@D)/tests'
-make[5]: Entering directory `$(@D)/tests'
 PASS: helin-segv
 PASS: help-version
 PASS: hufts
@@ -64,11 +10,7 @@
 PASS: zgrep-f
 PASS: zgrep-signal
 PASS: znew-k
-===================
-All 12 tests passed
-===================
-make[5]: Leaving directory `$(@D)/tests'
-make[4]: Leaving directory `$(@D)/tests'
-make[3]: Leaving directory `$(@D)/tests'
-make[2]: Leaving directory `$(@D)'
-make[1]: Leaving directory `$(@D)'
+# PASS:  12
+# XFAIL: 0
+# FAIL:  0
+# XPASS: 0
--- a/components/sed/Makefile	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/sed/Makefile	Mon Aug 03 15:20:18 2015 -0700
@@ -44,10 +44,21 @@
 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
 CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
 
-# Enable ASLR for this component
+COMPONENT_TEST_DIR =		$(@D)/testsuite
+
+COMPONENT_TEST_TRANSFORMS += \
+    '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
+    '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
+    '-e "s|^make.*: Nothing to be.*$$|XXX_CC_XXX|g" ' \
+    '-e "s|^/usr/gnu/bin/make.*$$|XXX_CC_XXX|g" ' \
+    '-e "/^XXX_CC_XXX$$/d" '
+
+COMPONENT_SYSTEM_TEST_ENV +=	SED=/usr/gnu/bin/sed
+COMPONENT_SYSTEM_TEST_ENV +=	PATH="$(GNUBIN):$(PATH)"
+COMPONENT_SYSTEM_TEST_DIR =	$(@D)/testsuite
+
 ASLR_MODE = $(ASLR_ENABLE)
 
-# common targets
 configure:	$(CONFIGURE_64)
 
 build:		$(BUILD_64)
@@ -56,7 +67,7 @@
 
 test:		$(TEST_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    configure $(SYSTEM_TEST_64)
 
 
 REQUIRED_PACKAGES += system/library
--- a/components/sed/test/results-64.master	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/sed/test/results-64.master	Mon Aug 03 15:20:18 2015 -0700
@@ -1,32 +1,3 @@
-make[1]: Entering directory `$(@D)'
-Making check in lib
-make[2]: Entering directory `$(@D)/lib'
-/usr/gnu/bin/make  check-recursive
-make[3]: Entering directory `$(@D)/lib'
-make[4]: Entering directory `$(@D)/lib'
-make[4]: Nothing to be done for `check-am'.
-make[4]: Leaving directory `$(@D)/lib'
-make[3]: Leaving directory `$(@D)/lib'
-make[2]: Leaving directory `$(@D)/lib'
-Making check in po
-make[2]: Entering directory `$(@D)/po'
-make[2]: Leaving directory `$(@D)/po'
-Making check in sed
-make[2]: Entering directory `$(@D)/sed'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/sed'
-Making check in doc
-make[2]: Entering directory `$(@D)/doc'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/doc'
-Making check in testsuite
-make[2]: Entering directory `$(@D)/testsuite'
-/usr/gnu/bin/make  
-make[3]: Entering directory `$(@D)/testsuite'
-make[3]: Nothing to be done for `all'.
-make[3]: Leaving directory `$(@D)/testsuite'
-/usr/gnu/bin/make  check-TESTS
-make[3]: Entering directory `$(@D)/testsuite'
 PASS: appquit
 PASS: enable
 PASS: sep
@@ -96,8 +67,3 @@
 ===================
 All 66 tests passed
 ===================
-make[3]: Leaving directory `$(@D)/testsuite'
-make[2]: Leaving directory `$(@D)/testsuite'
-make[2]: Entering directory `$(@D)'
-make[2]: Leaving directory `$(@D)'
-make[1]: Leaving directory `$(@D)'
--- a/components/text-utilities/Makefile	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/text-utilities/Makefile	Mon Aug 03 15:20:18 2015 -0700
@@ -96,6 +96,23 @@
 COMPONENT_TEST_ARGS =		--verbose
 COMPONENT_TEST_TARGETS =	colrm column hexdump tailf
 
+COMPONENT_SYSTEM_TEST_ENV +=   TS_CMD_COLRM=/usr/bin/colrm
+COMPONENT_SYSTEM_TEST_ENV +=   TS_CMD_COLUMN=/usr/bin/column
+COMPONENT_SYSTEM_TEST_ENV +=   TS_CMD_HEXDUMP=/usr/bin/hexdump
+COMPONENT_SYSTEM_TEST_ENV +=   TS_CMD_TAILF=/usr/bin/tailf
+COMPONENT_SYSTEM_TEST_ENV +=   PATH="$(GNUBIN):$(PATH)"
+COMPONENT_SYSTEM_TEST_DIR =    $(COMPONENT_SRC)/tests
+
+# Build the test_sysinfo program; copy it where the tests are looking for it.
+COMPONENT_PRE_SYSTEM_TEST_ACTION = \
+	(cd $(@D) ; $(GMAKE) AM_CFLAGS="" \
+		V=1 bin_PROGRAMS="test_sysinfo" test_sysinfo ; \
+		$(CP) test_sysinfo $(SOURCE_DIR))
+
+COMPONENT_SYSTEM_TEST_CMD =	./run.sh
+COMPONENT_SYSTEM_TEST_ARGS =	--verbose
+COMPONENT_SYSTEM_TEST_TARGETS =	colrm column hexdump tailf
+
 configure:	$(CONFIGURE_64)
 
 build:		$(BUILD_64)
@@ -104,7 +121,6 @@
 
 test:		install $(TEST_64)
 
-# Add install dependency as above when system-test targets are implemented.
-system-test: 	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test: 	configure $(SYSTEM_TEST_64)
 
 REQUIRED_PACKAGES += system/library
--- a/components/tidy/Makefile	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/tidy/Makefile	Mon Aug 03 15:20:18 2015 -0700
@@ -71,6 +71,11 @@
 # here, rather than create multiple identical master files.
 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
 
+COMPONENT_SYSTEM_TEST_ENV =	TIDY_BIN=/usr/bin/tidy
+COMPONENT_SYSTEM_TEST_DIR =	$(SOURCE_DIR)/test
+COMPONENT_SYSTEM_TEST_CMD =	./testall.sh
+COMPONENT_SYSTEM_TEST_TARGETS =
+
 ASLR_MODE = $(ASLR_ENABLE)
 
 # common targets
@@ -83,7 +88,7 @@
 
 test:		$(TEST_32_and_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    $(SYSTEM_TEST_32_and_64)
 
 REQUIRED_PACKAGES += developer/documentation-tool/doxygen
 REQUIRED_PACKAGES += system/library
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/tidy/patches/system-test.patch	Mon Aug 03 15:20:18 2015 -0700
@@ -0,0 +1,15 @@
+Patch to allow us to specify an alternate tidy binary when running tests.
+
+This patch should be sent upstream.
+
+--- tidy-1.0.0/test/testone.sh.orig	2015-07-31 11:20:28.840693501 -0700
++++ tidy-1.0.0/test/testone.sh	2015-07-31 11:20:59.008447677 -0700
+@@ -24,7 +24,7 @@
+ 
+ TESTNO=$1
+ EXPECTED=$2
+-TIDY=../console/tidy
++TIDY="${TIDY_BIN:-../console/tidy}"
+ INFILES=./input/in_${TESTNO}.*ml
+ CFGFILE=./input/cfg_${TESTNO}.txt
+ 
--- a/components/wdiff/Makefile	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/wdiff/Makefile	Mon Aug 03 15:20:18 2015 -0700
@@ -45,6 +45,19 @@
 
 COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
 
+COMPONENT_TEST_DIR =		$(SOURCE_DIR)/tests
+COMPONENT_TEST_CMD =		./testsuite
+COMPONENT_TEST_ARGS =		AUTOTEST_PATH="src"
+COMPONENT_TEST_TARGETS =
+
+COMPONENT_SYSTEM_TEST_DIR =	$(SOURCE_DIR)/tests
+COMPONENT_SYSTEM_TEST_CMD =	./testsuite
+COMPONENT_SYSTEM_TEST_ARGS =	AUTOTEST_PATH="src"
+COMPONENT_SYSTEM_TEST_TARGETS =
+
+# Get wdiff from /usr/bin
+COMPONENT_SYSTEM_TEST_ENV +=   PATH="/usr/bin"
+
 ASLR_MODE = $(ASLR_ENABLE)
 
 configure:	$(CONFIGURE_64)
@@ -55,7 +68,7 @@
 
 test:		$(TEST_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    configure $(SYSTEM_TEST_64)
 
 
 REQUIRED_PACKAGES += system/library
--- a/components/wdiff/test/results-64.master	Thu Jul 30 09:04:18 2015 -0700
+++ b/components/wdiff/test/results-64.master	Mon Aug 03 15:20:18 2015 -0700
@@ -1,38 +1,3 @@
-make[1]: Entering directory `$(@D)'
-Making check in lib
-make[2]: Entering directory `$(@D)/lib'
-/usr/gnu/bin/make  check-recursive
-make[3]: Entering directory `$(@D)/lib'
-Making check in po
-make[4]: Entering directory `$(@D)/lib/po'
-make[4]: Nothing to be done for `check'.
-make[4]: Leaving directory `$(@D)/lib/po'
-make[4]: Entering directory `$(@D)/lib'
-make[4]: Nothing to be done for `check-am'.
-make[4]: Leaving directory `$(@D)/lib'
-make[3]: Leaving directory `$(@D)/lib'
-make[2]: Leaving directory `$(@D)/lib'
-Making check in po
-make[2]: Entering directory `$(@D)/po'
-make[2]: Leaving directory `$(@D)/po'
-Making check in src
-make[2]: Entering directory `$(@D)/src'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/src'
-Making check in doc
-make[2]: Entering directory `$(@D)/doc'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/doc'
-Making check in man
-make[2]: Entering directory `$(@D)/man'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/man'
-make[2]: Entering directory `$(@D)'
-/usr/gnu/bin/make  check-local
-make[3]: Entering directory `$(@D)'
-abs_srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd $(SOURCE_DIR) && pwd`; cd tests; \
-CONFIG_SHELL="/bin/bash" /bin/bash $abs_srcdir/tests/testsuite \
-   AUTOTEST_PATH="src"
 ## ---------------------------------- ##
 ## GNU wdiff 1.2.2 test suite: wdiff. ##
 ## ---------------------------------- ##
@@ -46,17 +11,3 @@
 ## ------------- ##
 
 All 4 tests were successful.
-make[3]: Leaving directory `$(@D)'
-make[2]: Leaving directory `$(@D)'
-if test -d $(SOURCE_DIR)/.git				\
-	&& git --version >/dev/null 2>&1; then			\
-  cd $(SOURCE_DIR) &&						\
-  git submodule --quiet foreach					\
-      'test "$(git rev-parse "$sha1")"			\
-	  = "$(git merge-base origin "$sha1")"'		\
-    || { echo 'maint.mk: found non-public submodule commit' >&2;	\
-	 exit 1; };						\
-else								\
-  : ;								\
-fi
-make[1]: Leaving directory `$(@D)'