8005940: provide ant targets to get and update external test scripts
Reviewed-by: jlaskey, lagergren
This commit is contained in:
parent
12801c40c5
commit
ff9829969f
nashorn
bin
make
test
script/basic
src/jdk/nashorn/internal
@ -44,16 +44,16 @@ if %errorlevel% equ 0 (
|
||||
set CMD=%1 %JVM_FLAGS%
|
||||
)
|
||||
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/box2d.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/code-load.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/crypto.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/deltablue.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/gbemu.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/navier-stokes.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/pdfjs.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/raytrace.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/regexp.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/richards.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/splay.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/box2d.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/code-load.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/crypto.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/deltablue.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/gbemu.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/navier-stokes.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/pdfjs.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/raytrace.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/regexp.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/richards.js %OCTANE_ARGS%
|
||||
%CMD% test/script/basic/run-octane.js -- test/script/external/octane/splay.js %OCTANE_ARGS%
|
||||
endlocal
|
||||
goto :EOF
|
||||
|
@ -37,7 +37,7 @@ if [ ! -z $JAVA7_HOME ]; then
|
||||
echo "running ${ITERS} iterations with java7 using JAVA_HOME=${JAVA7_HOME}..."
|
||||
for BENCHMARK in "${BENCHMARKS[@]}"
|
||||
do
|
||||
CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/${BENCHMARK} ${OCTANE_ARGS}"
|
||||
CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/${BENCHMARK} ${OCTANE_ARGS}"
|
||||
$CMD
|
||||
done
|
||||
else
|
||||
@ -48,7 +48,7 @@ if [ ! -z $JAVA8_HOME ]; then
|
||||
echo "running ${ITERS} iterations with java8 using JAVA_HOME=${JAVA8_HOME}..."
|
||||
for BENCHMARK in "${BENCHMARKS[@]}"
|
||||
do
|
||||
CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/${BENCHMARK} ${OCTANE_ARGS}"
|
||||
CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/${BENCHMARK} ${OCTANE_ARGS}"
|
||||
$CMD
|
||||
done
|
||||
else
|
||||
|
@ -190,7 +190,7 @@ all: test
|
||||
clobber: clean
|
||||
|
||||
# All ant targets of interest
|
||||
ANT_TARGETS = clean jar javadoc shelldoc docs test test262 test262parallel # for now
|
||||
ANT_TARGETS = clean externals update-externals jar javadoc shelldoc docs test test262 test262parallel # for now
|
||||
|
||||
# Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
|
||||
$(OUTPUTDIR)/build/ant-diagnostics.log:
|
||||
|
@ -245,7 +245,6 @@
|
||||
classpath="${run.test.classpath}"
|
||||
fork="true"
|
||||
dir=".">
|
||||
<jvmarg line="${boot.class.path}"/>
|
||||
<jvmarg line="${ext.class.path}"/>
|
||||
<jvmarg line="${run.test.jvmargs.octane}"/>
|
||||
<arg value="${octane-test-sys-prop.test.js.framework}"/>
|
||||
@ -277,7 +276,6 @@
|
||||
classpath="${run.test.classpath}"
|
||||
fork="true"
|
||||
dir=".">
|
||||
<jvmarg line="${boot.class.path}"/>
|
||||
<jvmarg line="${run.test.jvmargs.octane}"/>
|
||||
<arg value="${octane-test-sys-prop.test.js.framework}"/>
|
||||
<arg value="${octane-tests}"/>
|
||||
@ -312,7 +310,6 @@
|
||||
classpath="${run.test.classpath}"
|
||||
fork="true"
|
||||
dir=".">
|
||||
<jvmarg line="${boot.class.path}"/>
|
||||
<jvmarg line="${ext.class.path}"/>
|
||||
<jvmarg line="${run.test.jvmargs}"/>
|
||||
<arg value="-timezone=PST"/>
|
||||
@ -338,7 +335,6 @@
|
||||
classpath="${run.test.classpath}"
|
||||
fork="true"
|
||||
dir=".">
|
||||
<jvmarg line="${boot.class.path}"/>
|
||||
<jvmarg line="${run.test.jvmargs}"/>
|
||||
<arg value="${sunspider-test-sys-prop.test.js.framework}"/>
|
||||
<arg value="${sunspider-tests}/"/>
|
||||
|
@ -31,6 +31,12 @@
|
||||
<pathelement location="${dist.dir}"/>
|
||||
</path>
|
||||
<property name="ext.class.path" value="-Djava.ext.dirs="${toString:nashorn.ext.path}""/>
|
||||
<condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
|
||||
<available file="/usr/local/bin/svn"/>
|
||||
</condition>
|
||||
<condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
|
||||
<available file="/usr/local/bin/hg"/>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="prepare" depends="init">
|
||||
@ -357,4 +363,93 @@
|
||||
<arg value="test.js"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- targets to get external script tests -->
|
||||
|
||||
<!-- test262 test suite -->
|
||||
<target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
|
||||
<!-- clone test262 mercurial repo -->
|
||||
<exec executable="${hg.executable}">
|
||||
<arg value="clone"/>
|
||||
<arg value="http://hg.ecmascript.org/tests/test262"/>
|
||||
<arg value="${test.external.dir}/test262"/>
|
||||
</exec>
|
||||
</target>
|
||||
<target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
|
||||
<!-- update test262 mercurial repo -->
|
||||
<exec executable="${hg.executable}" dir="${test.external.dir}/test262">
|
||||
<arg value="pull"/>
|
||||
<arg value="-u"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- octane benchmark -->
|
||||
<target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}">
|
||||
<!-- checkout octane benchmarks -->
|
||||
<exec executable="${svn.executable}">
|
||||
<arg value="--non-interactive"/>
|
||||
<arg value="--trust-server-cert"/>
|
||||
<arg value="checkout"/>
|
||||
<arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/>
|
||||
<arg value="${test.external.dir}/octane"/>
|
||||
</exec>
|
||||
</target>
|
||||
<target name="update-octane" depends="init" if="${test-sys-prop.external.octane}">
|
||||
<!-- update octane benchmarks -->
|
||||
<exec executable="${svn.executable}" dir="${test.external.dir}/octane">
|
||||
<arg value="--non-interactive"/>
|
||||
<arg value="--trust-server-cert"/>
|
||||
<arg value="update"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- sunspider benchmark -->
|
||||
<target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}">
|
||||
<!-- checkout sunspider -->
|
||||
<exec executable="${svn.executable}">
|
||||
<arg value="--non-interactive"/>
|
||||
<arg value="--trust-server-cert"/>
|
||||
<arg value="checkout"/>
|
||||
<arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/>
|
||||
<arg value="${test.external.dir}/sunspider"/>
|
||||
</exec>
|
||||
</target>
|
||||
<target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}">
|
||||
<!-- update sunspider -->
|
||||
<exec executable="${svn.executable}" dir="${test.external.dir}/sunspider">
|
||||
<arg value="--non-interactive"/>
|
||||
<arg value="--trust-server-cert"/>
|
||||
<arg value="update"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- get all external test scripts -->
|
||||
<target name="externals" depends="prepare, check-external-tests, get-test262, get-octane, get-sunspider">
|
||||
<!-- make external test dir -->
|
||||
<mkdir dir="${test.external.dir}"/>
|
||||
|
||||
<!-- jquery -->
|
||||
<mkdir dir="${test.external.dir}/jquery"/>
|
||||
<get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
|
||||
<get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
|
||||
|
||||
<!-- prototype -->
|
||||
<mkdir dir="${test.external.dir}/prototype"/>
|
||||
<get src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0/prototype.js" dest="${test.external.dir}/prototype" usetimestamp="true" skipexisting="true" ignoreerrors="true"/>
|
||||
|
||||
<!-- underscorejs -->
|
||||
<mkdir dir="${test.external.dir}/underscore"/>
|
||||
<get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
|
||||
<get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
|
||||
|
||||
<!-- yui -->
|
||||
<mkdir dir="${test.external.dir}/yui"/>
|
||||
<get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
|
||||
<get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
|
||||
|
||||
</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"/>
|
||||
|
||||
</project>
|
||||
|
@ -154,7 +154,7 @@ test-sys-prop.test.js.exclude.dir=${test.script.dir}/currently-failing ${test.ex
|
||||
test-sys-prop.test.js.unchecked.dir=${test262.dir}
|
||||
|
||||
# test root for octane
|
||||
octane-test-sys-prop.test.js.roots=${test.external.dir}/octane/benchmarks
|
||||
octane-test-sys-prop.test.js.roots=${test.external.dir}/octane/
|
||||
|
||||
# framework root for octane
|
||||
octane-test-sys-prop.test.js.framework=${test.basic.dir}/run-octane.js
|
||||
@ -163,7 +163,7 @@ octane-test-sys-prop.test.js.framework=${test.basic.dir}/run-octane.js
|
||||
octane-test-sys-prop.test.js.exclude.list=base.js
|
||||
|
||||
# test root for sunspider
|
||||
sunspider-test-sys-prop.test.js.roots=${test.external.dir}/sunspider/
|
||||
sunspider-test-sys-prop.test.js.roots=${test.external.dir}/sunspider/tests/sunspider-1.0/
|
||||
|
||||
# framework root for sunspider
|
||||
sunspider-test-sys-prop.test.js.framework=${test.basic.dir}/runsunspider.js
|
||||
|
@ -52,7 +52,7 @@ var ignoreTeardown = [
|
||||
var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
|
||||
|
||||
// TODO: why is this path hard coded when it's defined in project properties?
|
||||
var path = dir + "../external/octane/benchmarks/";
|
||||
var path = dir + "../external/octane/";
|
||||
|
||||
var runtime = "";
|
||||
var verbose = false;
|
||||
|
@ -121,30 +121,29 @@ if (typeof $ARGS !== 'undefined') {
|
||||
}
|
||||
|
||||
var tests = [
|
||||
'check-3d-cube.js',
|
||||
'check-access-nsieve.js',
|
||||
'check-crypto-aes.js',
|
||||
'check-math-spectral-norm.js',
|
||||
'check-3d-morph.js',
|
||||
'check-bitops-3bit-bits-in-byte.js',
|
||||
'check-crypto-md5.js',
|
||||
'check-mont.js',
|
||||
'check-3d-raytrace.js',
|
||||
'check-bitops-bits-in-byte.js',
|
||||
'check-crypto-sha1.js',
|
||||
'check-regexp-dna.js',
|
||||
'check-access-binary-trees.js',
|
||||
'check-bitops-bitwise-and.js',
|
||||
'check-date-format-tofte.js',
|
||||
'check-string-fasta.js',
|
||||
'check-access-fannkuch.js',
|
||||
'check-bitops-nsieve-bits.js',
|
||||
'check-math-cordic.js',
|
||||
'check-string-tagcloud.js',
|
||||
'check-access-nbody.js',
|
||||
'check-controlflow-recursive.js',
|
||||
'check-math-partial-sums.js',
|
||||
'check-string-unpack-code.js'
|
||||
'3d-cube.js',
|
||||
'access-nsieve.js',
|
||||
'crypto-aes.js',
|
||||
'math-spectral-norm.js',
|
||||
'3d-morph.js',
|
||||
'bitops-3bit-bits-in-byte.js',
|
||||
'crypto-md5.js',
|
||||
'3d-raytrace.js',
|
||||
'bitops-bits-in-byte.js',
|
||||
'crypto-sha1.js',
|
||||
'regexp-dna.js',
|
||||
'access-binary-trees.js',
|
||||
'bitops-bitwise-and.js',
|
||||
'date-format-tofte.js',
|
||||
'string-fasta.js',
|
||||
'access-fannkuch.js',
|
||||
'bitops-nsieve-bits.js',
|
||||
'math-cordic.js',
|
||||
'string-tagcloud.js',
|
||||
'access-nbody.js',
|
||||
'controlflow-recursive.js',
|
||||
'math-partial-sums.js',
|
||||
'string-unpack-code.js'
|
||||
];
|
||||
|
||||
// handle the case this script may be run by a JS engine that doesn't
|
||||
@ -152,7 +151,7 @@ var tests = [
|
||||
var dir = (typeof(__DIR__) == 'undefined')? "test/script/basic/" : __DIR__;
|
||||
|
||||
for (i in tests) {
|
||||
tests[i] = dir + '../external/sunspider/' + tests[i];
|
||||
tests[i] = dir + '../external/sunspider/tests/sunspider-1.0/' + tests[i];
|
||||
}
|
||||
|
||||
var verbose_run = false;
|
||||
|
@ -43,8 +43,6 @@ import org.testng.annotations.Test;
|
||||
public class CompilerTest {
|
||||
private static final boolean VERBOSE = Boolean.valueOf(System.getProperty("compilertest.verbose"));
|
||||
private static final boolean TEST262 = Boolean.valueOf(System.getProperty("compilertest.test262"));
|
||||
|
||||
private static final String ES5CONFORM_DIR = System.getProperty("es5conform.testcases.dir");
|
||||
private static final String TEST_BASIC_DIR = System.getProperty("test.basic.dir");
|
||||
private static final String TEST262_SUITE_DIR = System.getProperty("test262.suite.dir");
|
||||
|
||||
@ -90,7 +88,6 @@ public class CompilerTest {
|
||||
}
|
||||
});
|
||||
}
|
||||
compileTestSet(ES5CONFORM_DIR, null);
|
||||
compileTestSet(TEST_BASIC_DIR, null);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,6 @@ public class ParserTest {
|
||||
private static final boolean VERBOSE = Boolean.valueOf(System.getProperty("parsertest.verbose"));
|
||||
private static final boolean TEST262 = Boolean.valueOf(System.getProperty("parsertest.test262"));
|
||||
|
||||
private static final String ES5CONFORM_DIR = System.getProperty("es5conform.testcases.dir");
|
||||
private static final String TEST_BASIC_DIR = System.getProperty("test.basic.dir");
|
||||
private static final String TEST262_SUITE_DIR = System.getProperty("test262.suite.dir");
|
||||
|
||||
@ -80,7 +79,6 @@ public class ParserTest {
|
||||
}
|
||||
});
|
||||
}
|
||||
parseTestSet(ES5CONFORM_DIR, null);
|
||||
parseTestSet(TEST_BASIC_DIR, null);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user