21351386 Hookup system-tests for libssh2
authorRich Burridge <rich.burridge@oracle.com>
Wed, 01 Jul 2015 08:38:58 -0700
changeset 4580 5c702246a898
parent 4578 6ab3708b06cd
child 4581 021d774e32e1
21351386 Hookup system-tests for libssh2
components/libssh2/Makefile
components/libssh2/test/results-all.master
--- a/components/libssh2/Makefile	Wed Jun 17 14:49:38 2015 -0700
+++ b/components/libssh2/Makefile	Wed Jul 01 08:38:58 2015 -0700
@@ -59,11 +59,28 @@
 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
 	'-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
 	'-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
+        '-e "s|^.*make.*$$|XXX_CC_XXX|g" ' \
+        '-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
+        '-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
 	'-e "/^XXX_CC_XXX$$/d" '
 
+# Just run "gmake check" from the tests directory.
+COMPONENT_TEST_DIR =		$(BUILD_DIR_$(BITS))/tests
+COMPONENT_SYSTEM_TEST_DIR =	$(BUILD_DIR_$(BITS))/tests
+
+# Adjust how the simple test program is built.
+COMPONENT_PRE_SYSTEM_TEST_ACTION += \
+	$(GSED) -e "s|^simple_DEPENDENCIES.*$$|simple_DEPENDENCIES =|" \
+		-e "s|^LDADD.*$$|LDADD = -lssh2|" \
+		$(BUILD_DIR_$(BITS))/tests/Makefile \
+		> $(BUILD_DIR_$(BITS))/tests/Makefile-system-test
+
+COMPONENT_SYSTEM_TEST_ENV = \
+	AM_MAKEFLAGS="-f $(BUILD_DIR_$(BITS))/tests/Makefile-system-test"
+COMPONENT_SYSTEM_TEST_ARGS = -f $(BUILD_DIR_$(BITS))/tests/Makefile-system-test
+
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
-# common targets
 configure:	$(CONFIGURE_32_and_64)
 
 build:		$(BUILD_32_and_64)
@@ -72,7 +89,7 @@
 
 test:		$(TEST_32_and_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    configure $(SYSTEM_TEST_32_and_64)
 
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += library/zlib
--- a/components/libssh2/test/results-all.master	Wed Jun 17 14:49:38 2015 -0700
+++ b/components/libssh2/test/results-all.master	Wed Jul 01 08:38:58 2015 -0700
@@ -1,14 +1,3 @@
-make[1]: Entering directory `$(@D)'
-Making check in src
-make[2]: Entering directory `$(@D)/src'
-make[2]: Leaving directory `$(@D)/src'
-Making check in tests
-make[2]: Entering directory `$(@D)/tests'
-/usr/gnu/bin/make  simple
-make[3]: Entering directory `$(@D)/tests'
-make[3]: Leaving directory `$(@D)/tests'
-/usr/gnu/bin/make  check-TESTS
-make[3]: Entering directory `$(@D)/tests'
 PASS: simple
 usage:	man [-] [-adFlprt] [-M path] [-T macro-package ] [ -s section ] name ...
 	man [-M path] [-s section] -k keyword ...
@@ -19,16 +8,3 @@
 All 1 tests passed
 (1 tests were not run)
 ======================
-make[3]: Leaving directory `$(@D)/tests'
-make[2]: Leaving directory `$(@D)/tests'
-Making check in docs
-make[2]: Entering directory `$(@D)/docs'
-make[2]: Nothing to be done for `check'.
-make[2]: Leaving directory `$(@D)/docs'
-Making check in example
-make[2]: Entering directory `$(@D)/example'
-make[2]: Leaving directory `$(@D)/example'
-make[2]: Entering directory `$(@D)'
-make[2]: Nothing to be done for `check-am'.
-make[2]: Leaving directory `$(@D)'
-make[1]: Leaving directory `$(@D)'