make-rules/ant.mk
branchs11u3-sru
changeset 5535 ae5bc52953a4
parent 3996 20c0f21bbe1e
--- a/make-rules/ant.mk	Wed Feb 24 05:57:34 2016 -0800
+++ b/make-rules/ant.mk	Thu Feb 25 01:05:50 2016 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 ANT=/usr/bin/ant
@@ -46,6 +46,21 @@
 	$(COMPONENT_POST_INSTALL_ACTION)
 	$(TOUCH) [email protected]
 
+COMPONENT_TEST_ENV_CMD = $(ENV)
+COMPONENT_TEST_ENV += JAVA_HOME="$(JAVA_HOME)"
+COMPONENT_TEST_CMD = $(ANT)
+COMPONENT_TEST_DIR = $(@D)
+
+$(BUILD_DIR)/%/.tested:    $(BUILD_DIR)/%/.built
+	$(COMPONENT_PRE_TEST_ACTION)
+	(cd $(COMPONENT_TEST_DIR) ; \
+		$(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
+		$(COMPONENT_TEST_CMD) \
+		$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
+	$(COMPONENT_POST_TEST_ACTION)
+	$(COMPONENT_TEST_CLEANUP)
+	$(TOUCH) [email protected]
+
 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
 parfait: build
 else