8006093: Add a makefile target to run all tests (test, test262, perf tests)
Reviewed-by: attila, hannesw
--- a/nashorn/make/Makefile Fri Jan 11 18:26:18 2013 +0530
+++ b/nashorn/make/Makefile Fri Jan 11 20:34:22 2013 +0530
@@ -181,16 +181,13 @@
endif
# Default target and expected 'do everything' target
-# comments docs to avoid too many ASM warnings
-# all: test docs
-
-all: test
+all: test docs
# Standard make clobber target
clobber: clean
# All ant targets of interest
-ANT_TARGETS = clean externals update-externals jar javadoc shelldoc docs test test262 test262parallel # for now
+ANT_TARGETS = clean externals update-externals jar javadoc shelldoc docs test test262 test262parallel octane sunspider perf alltests
# Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
$(OUTPUTDIR)/build/ant-diagnostics.log:
--- a/nashorn/make/build.xml Fri Jan 11 18:26:18 2013 +0530
+++ b/nashorn/make/build.xml Fri Jan 11 20:34:22 2013 +0530
@@ -37,6 +37,10 @@
<condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
<available file="/usr/local/bin/hg"/>
</condition>
+ <!-- check if JDK already has ASM classes -->
+ <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
+ <!-- check if testng.jar is avaiable -->
+ <available property="testng.available" file="${file.reference.testng.jar}"/>
</target>
<target name="prepare" depends="init">
@@ -46,10 +50,6 @@
<mkdir dir="${build.test.classes.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.javadoc.dir}"/>
- <!-- check if JDK already has ASM classes -->
- <available property="asm.available" classname="jdk.internal.org.objectweb.asm.Type"/>
- <!-- check if testng.jar is avaiable -->
- <available property="testng.available" file="${file.reference.testng.jar}"/>
</target>
<target name="clean" depends="init, clean-nasgen">
@@ -424,7 +424,7 @@
</target>
<!-- get all external test scripts -->
- <target name="externals" depends="prepare, check-external-tests, get-test262, get-octane, get-sunspider">
+ <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider">
<!-- make external test dir -->
<mkdir dir="${test.external.dir}"/>
@@ -450,6 +450,16 @@
</target>
<!-- update external test suites that are pulled from source control systems -->
- <target name="update-externals" depends="prepare, check-external-tests, update-test262, update-octane, update-sunspider"/>
+ <target name="update-externals" depends="init, check-external-tests, update-test262, update-octane, update-sunspider"/>
+
+ <!-- run all perf tests -->
+ <target name="perf" depends="externals, update-externals, sunspider, octane"/>
+
+ <!-- run all tests -->
+ <target name="exit-if-no-testng" depends="init, check-testng" unless="${testng.available}">
+ <fail message="Exiting.."/>
+ </target>
+
+ <target name="alltests" depends="exit-if-no-testng, externals, update-externals, test, test262parallel, perf"/>
</project>