components/getopt/Makefile
changeset 4737 844cca6e99f3
parent 4339 6501cf9c29f9
child 5682 94c0ca64c022
--- a/components/getopt/Makefile	Tue Aug 04 11:47:02 2015 -0700
+++ b/components/getopt/Makefile	Tue Aug 04 12:01:03 2015 -0700
@@ -56,9 +56,23 @@
 COMPONENT_POST_UNPACK_ACTION= \
 	$(RM) $(COMPONENT_SRC)/gnu/*.o
 
-COMPONENT_TEST_ENV +=		PATH=$(BUILD_DIR_$(BITS)):$(PATH)
+COMPONENT_TEST_TRANSFORMS += \
+	'-e "s|\./getopt|getopt|g" ' \
+	'-e "s|/usr/gnu/bin/getopt|getopt|g" ' \
+	'-e "s|\./run-tests.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make.*: Leaving directory.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make.*: Entering directory.*$$|XXX_CC_XXX|g" ' \
+	'-e "s|^make\[1\].*$$|XXX_CC_XXX|g" ' \
+	'-e "/^XXX_CC_XXX$$/d" '
+
+COMPONENT_TEST_ENV +=		PATH=$(BUILD_DIR_$(BITS)):$(GNUBIN):/usr/bin
 COMPONENT_TEST_TARGETS =	test
 
+COMPONENT_SYSTEM_TEST_ENV +=	PATH=$(GNUBIN):/usr/bin/
+COMPONENT_SYSTEM_TEST_CMD =	./run-tests
+COMPONENT_SYSTEM_TEST_ARGS =	/usr/gnu/bin/getopt
+COMPONENT_SYSTEM_TEST_TARGETS =
+
 ASLR_MODE = $(ASLR_ENABLE)
 
 build:		$(BUILD_64)
@@ -67,7 +81,7 @@
 
 test:		$(TEST_64)
 
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+system-test:    $(SYSTEM_TEST_64)
 
 
 REQUIRED_PACKAGES += system/library