make-rules/ant.mk
changeset 4091 fca9099ab398
parent 3864 77a09e73626b
child 4393 963a977eeb62
--- a/make-rules/ant.mk	Tue Apr 07 05:51:44 2015 -0700
+++ b/make-rules/ant.mk	Thu Apr 09 18:28:09 2015 -0700
@@ -50,6 +50,10 @@
 COMPONENT_TEST_ENV += JAVA_HOME="$(JAVA_HOME)"
 COMPONENT_TEST_CMD = $(ANT)
 
+COMPONENT_SYSTEM_TEST_ENV_CMD = $(ENV)
+COMPONENT_SYSTEM_TEST_ENV += JAVA_HOME="$(JAVA_HOME)"
+COMPONENT_SYSTEM_TEST_CMD = $(ANT)
+
 # test the built source
 $(BUILD_DIR)/%/.tested-and-compared:    $(BUILD_DIR)/%/.built
 	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
@@ -77,6 +81,33 @@
 	$(COMPONENT_TEST_CLEANUP)
 	$(TOUCH) [email protected]
 
+# test the installed packages
+$(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
+	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
+	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
+	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
+		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
+		$(COMPONENT_SYSTEM_TEST_CMD) \
+		$(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS)) \
+		&> $(COMPONENT_TEST_OUTPUT)
+	$(COMPONENT_POST_SYSTEM_TEST_ACTION)
+	$(COMPONENT_TEST_CREATE_TRANSFORMS)
+	$(COMPONENT_TEST_PERFORM_TRANSFORM)
+	$(COMPONENT_TEST_COMPARE)
+	$(COMPONENT_SYSTEM_TEST_CLEANUP)
+	$(TOUCH) [email protected]
+
+$(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
+	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
+	(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
+		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
+		$(COMPONENT_SYSTEM_TEST_CMD) \
+		$(COMPONENT_SYSTEM_TEST_ARGS) $(COMPONENT_SYSTEM_TEST_TARGETS))
+	$(COMPONENT_POST_SYSTEM_TEST_ACTION)
+	$(COMPONENT_SYSTEM_TEST_CLEANUP)
+	$(TOUCH) [email protected]
+
 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
 parfait: build
 else