8005940: provide ant targets to get and update external test scripts

Wed, 09 Jan 2013 22:32:40 +0530

author
sundar
date
Wed, 09 Jan 2013 22:32:40 +0530
changeset 19
4cd65798ec70
parent 18
812b9963b1c7
child 20
9f59ba5090f2

8005940: provide ant targets to get and update external test scripts
Reviewed-by: jlaskey, lagergren

bin/verbose_octane.bat file | annotate | diff | comparison | revisions
bin/verbose_octane.sh file | annotate | diff | comparison | revisions
make/Makefile file | annotate | diff | comparison | revisions
make/build-benchmark.xml file | annotate | diff | comparison | revisions
make/build.xml file | annotate | diff | comparison | revisions
make/project.properties file | annotate | diff | comparison | revisions
test/script/basic/run-octane.js file | annotate | diff | comparison | revisions
test/script/basic/runsunspider.js file | annotate | diff | comparison | revisions
test/src/jdk/nashorn/internal/codegen/CompilerTest.java file | annotate | diff | comparison | revisions
test/src/jdk/nashorn/internal/parser/ParserTest.java file | annotate | diff | comparison | revisions
     1.1 --- a/bin/verbose_octane.bat	Wed Jan 09 15:02:48 2013 +0100
     1.2 +++ b/bin/verbose_octane.bat	Wed Jan 09 22:32:40 2013 +0530
     1.3 @@ -44,16 +44,16 @@
     1.4    set CMD=%1 %JVM_FLAGS%
     1.5  )
     1.6  
     1.7 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/box2d.js %OCTANE_ARGS%
     1.8 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/code-load.js %OCTANE_ARGS%
     1.9 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/crypto.js %OCTANE_ARGS%
    1.10 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/deltablue.js %OCTANE_ARGS%
    1.11 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/gbemu.js %OCTANE_ARGS%
    1.12 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/navier-stokes.js %OCTANE_ARGS%
    1.13 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/pdfjs.js %OCTANE_ARGS%
    1.14 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/raytrace.js %OCTANE_ARGS%
    1.15 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/regexp.js %OCTANE_ARGS%
    1.16 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/richards.js %OCTANE_ARGS%
    1.17 -%CMD% test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/splay.js %OCTANE_ARGS%
    1.18 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/box2d.js %OCTANE_ARGS%
    1.19 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/code-load.js %OCTANE_ARGS%
    1.20 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/crypto.js %OCTANE_ARGS%
    1.21 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/deltablue.js %OCTANE_ARGS%
    1.22 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/gbemu.js %OCTANE_ARGS%
    1.23 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/navier-stokes.js %OCTANE_ARGS%
    1.24 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/pdfjs.js %OCTANE_ARGS%
    1.25 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/raytrace.js %OCTANE_ARGS%
    1.26 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/regexp.js %OCTANE_ARGS%
    1.27 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/richards.js %OCTANE_ARGS%
    1.28 +%CMD% test/script/basic/run-octane.js -- test/script/external/octane/splay.js %OCTANE_ARGS%
    1.29  endlocal
    1.30  goto :EOF
     2.1 --- a/bin/verbose_octane.sh	Wed Jan 09 15:02:48 2013 +0100
     2.2 +++ b/bin/verbose_octane.sh	Wed Jan 09 22:32:40 2013 +0530
     2.3 @@ -37,7 +37,7 @@
     2.4      echo "running ${ITERS} iterations with java7 using JAVA_HOME=${JAVA7_HOME}..."
     2.5      for BENCHMARK in "${BENCHMARKS[@]}"
     2.6      do 
     2.7 -	CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/${BENCHMARK} ${OCTANE_ARGS}"
     2.8 +	CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/${BENCHMARK} ${OCTANE_ARGS}"
     2.9  	$CMD
    2.10      done
    2.11  else
    2.12 @@ -48,7 +48,7 @@
    2.13      echo "running ${ITERS} iterations with java8 using JAVA_HOME=${JAVA8_HOME}..."   
    2.14      for BENCHMARK in "${BENCHMARKS[@]}"
    2.15      do 
    2.16 -	CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/benchmarks/${BENCHMARK} ${OCTANE_ARGS}"
    2.17 +	CMD="${JAVA8_HOME}/bin/java ${JVM_FLAGS} test/script/basic/run-octane.js -- test/script/external/octane/${BENCHMARK} ${OCTANE_ARGS}"
    2.18  	$CMD
    2.19      done
    2.20  else 
     3.1 --- a/make/Makefile	Wed Jan 09 15:02:48 2013 +0100
     3.2 +++ b/make/Makefile	Wed Jan 09 22:32:40 2013 +0530
     3.3 @@ -190,7 +190,7 @@
     3.4  clobber: clean
     3.5  
     3.6  # All ant targets of interest
     3.7 -ANT_TARGETS = clean jar javadoc shelldoc docs test test262 test262parallel # for now
     3.8 +ANT_TARGETS = clean externals update-externals jar javadoc shelldoc docs test test262 test262parallel # for now
     3.9  
    3.10  # Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
    3.11  $(OUTPUTDIR)/build/ant-diagnostics.log:
     4.1 --- a/make/build-benchmark.xml	Wed Jan 09 15:02:48 2013 +0100
     4.2 +++ b/make/build-benchmark.xml	Wed Jan 09 22:32:40 2013 +0530
     4.3 @@ -245,7 +245,6 @@
     4.4            classpath="${run.test.classpath}"
     4.5            fork="true"
     4.6            dir=".">
     4.7 -      <jvmarg line="${boot.class.path}"/>
     4.8        <jvmarg line="${ext.class.path}"/>
     4.9        <jvmarg line="${run.test.jvmargs.octane}"/>
    4.10        <arg value="${octane-test-sys-prop.test.js.framework}"/>
    4.11 @@ -277,7 +276,6 @@
    4.12            classpath="${run.test.classpath}"
    4.13            fork="true"
    4.14            dir=".">
    4.15 -      <jvmarg line="${boot.class.path}"/>
    4.16        <jvmarg line="${run.test.jvmargs.octane}"/>
    4.17        <arg value="${octane-test-sys-prop.test.js.framework}"/>
    4.18        <arg value="${octane-tests}"/>
    4.19 @@ -312,7 +310,6 @@
    4.20            classpath="${run.test.classpath}"
    4.21            fork="true"
    4.22            dir=".">
    4.23 -      <jvmarg line="${boot.class.path}"/>
    4.24        <jvmarg line="${ext.class.path}"/>
    4.25        <jvmarg line="${run.test.jvmargs}"/>
    4.26        <arg value="-timezone=PST"/>
    4.27 @@ -338,7 +335,6 @@
    4.28            classpath="${run.test.classpath}"
    4.29            fork="true"
    4.30            dir=".">
    4.31 -      <jvmarg line="${boot.class.path}"/>
    4.32        <jvmarg line="${run.test.jvmargs}"/>
    4.33        <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
    4.34        <arg value="${sunspider-tests}/"/>
     5.1 --- a/make/build.xml	Wed Jan 09 15:02:48 2013 +0100
     5.2 +++ b/make/build.xml	Wed Jan 09 22:32:40 2013 +0530
     5.3 @@ -31,6 +31,12 @@
     5.4        <pathelement location="${dist.dir}"/>
     5.5      </path>
     5.6      <property name="ext.class.path" value="-Djava.ext.dirs=&quot;${toString:nashorn.ext.path}&quot;"/>
     5.7 +    <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
     5.8 +      <available file="/usr/local/bin/svn"/>
     5.9 +    </condition>
    5.10 +    <condition property="hg.executable" value="/usr/local/bin/hg" else="hg">
    5.11 +      <available file="/usr/local/bin/hg"/>
    5.12 +    </condition>
    5.13    </target>
    5.14  
    5.15    <target name="prepare" depends="init">
    5.16 @@ -357,4 +363,93 @@
    5.17          <arg value="test.js"/>
    5.18      </java>
    5.19    </target>
    5.20 +
    5.21 +  <!-- targets to get external script tests -->
    5.22 +
    5.23 +  <!-- test262 test suite -->
    5.24 +  <target name="get-test262" depends="init" unless="${test-sys-prop.external.test262}">
    5.25 +    <!-- clone test262 mercurial repo -->
    5.26 +    <exec executable="${hg.executable}">
    5.27 +       <arg value="clone"/>
    5.28 +       <arg value="http://hg.ecmascript.org/tests/test262"/>
    5.29 +       <arg value="${test.external.dir}/test262"/>
    5.30 +    </exec>
    5.31 +  </target>
    5.32 +  <target name="update-test262" depends="init" if="${test-sys-prop.external.test262}">
    5.33 +    <!-- update test262 mercurial repo -->
    5.34 +    <exec executable="${hg.executable}" dir="${test.external.dir}/test262">
    5.35 +       <arg value="pull"/>
    5.36 +       <arg value="-u"/>
    5.37 +    </exec>
    5.38 +  </target>
    5.39 +
    5.40 +  <!-- octane benchmark -->
    5.41 +  <target name="get-octane" depends="init" unless="${test-sys-prop.external.octane}">
    5.42 +    <!-- checkout octane benchmarks -->
    5.43 +    <exec executable="${svn.executable}">
    5.44 +       <arg value="--non-interactive"/>
    5.45 +       <arg value="--trust-server-cert"/>
    5.46 +       <arg value="checkout"/>
    5.47 +       <arg value="http://octane-benchmark.googlecode.com/svn/trunk/"/>
    5.48 +       <arg value="${test.external.dir}/octane"/>
    5.49 +    </exec>
    5.50 +  </target>
    5.51 +  <target name="update-octane" depends="init" if="${test-sys-prop.external.octane}">
    5.52 +    <!-- update octane benchmarks -->
    5.53 +    <exec executable="${svn.executable}" dir="${test.external.dir}/octane">
    5.54 +       <arg value="--non-interactive"/>
    5.55 +       <arg value="--trust-server-cert"/>
    5.56 +       <arg value="update"/>
    5.57 +    </exec>
    5.58 +  </target>
    5.59 +
    5.60 +  <!-- sunspider benchmark -->
    5.61 +  <target name="get-sunspider" depends="init" unless="${test-sys-prop.external.sunspider}">
    5.62 +    <!-- checkout sunspider -->
    5.63 +    <exec executable="${svn.executable}">
    5.64 +       <arg value="--non-interactive"/>
    5.65 +       <arg value="--trust-server-cert"/>
    5.66 +       <arg value="checkout"/>
    5.67 +       <arg value="http://svn.webkit.org/repository/webkit/trunk/PerformanceTests/SunSpider"/>
    5.68 +       <arg value="${test.external.dir}/sunspider"/>
    5.69 +    </exec>
    5.70 +  </target>
    5.71 +  <target name="update-sunspider" depends="init" if="${test-sys-prop.external.sunspider}">
    5.72 +    <!-- update sunspider -->
    5.73 +    <exec executable="${svn.executable}" dir="${test.external.dir}/sunspider">
    5.74 +       <arg value="--non-interactive"/>
    5.75 +       <arg value="--trust-server-cert"/>
    5.76 +       <arg value="update"/>
    5.77 +    </exec>
    5.78 +  </target>
    5.79 +
    5.80 +  <!-- get all external test scripts -->
    5.81 +  <target name="externals" depends="prepare, check-external-tests, get-test262, get-octane, get-sunspider">
    5.82 +    <!-- make external test dir -->
    5.83 +    <mkdir dir="${test.external.dir}"/> 
    5.84 +
    5.85 +    <!-- jquery -->
    5.86 +    <mkdir dir="${test.external.dir}/jquery"/>    
    5.87 +    <get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
    5.88 +    <get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
    5.89 +
    5.90 +    <!-- prototype -->
    5.91 +    <mkdir dir="${test.external.dir}/prototype"/>    
    5.92 +    <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"/>
    5.93 +
    5.94 +    <!-- underscorejs -->
    5.95 +    <mkdir dir="${test.external.dir}/underscore"/> 
    5.96 +    <get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
    5.97 +    <get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
    5.98 +
    5.99 +    <!-- yui -->
   5.100 +    <mkdir dir="${test.external.dir}/yui"/> 
   5.101 +    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
   5.102 +    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
   5.103 +
   5.104 +  </target>
   5.105 +
   5.106 +  <!-- update external test suites that are pulled from source control systems -->
   5.107 +  <target name="update-externals" depends="prepare, check-external-tests, update-test262, update-octane, update-sunspider"/>
   5.108 +
   5.109  </project>
     6.1 --- a/make/project.properties	Wed Jan 09 15:02:48 2013 +0100
     6.2 +++ b/make/project.properties	Wed Jan 09 22:32:40 2013 +0530
     6.3 @@ -154,7 +154,7 @@
     6.4  test-sys-prop.test.js.unchecked.dir=${test262.dir}
     6.5  
     6.6  # test root for octane
     6.7 -octane-test-sys-prop.test.js.roots=${test.external.dir}/octane/benchmarks
     6.8 +octane-test-sys-prop.test.js.roots=${test.external.dir}/octane/
     6.9  
    6.10  # framework root for octane
    6.11  octane-test-sys-prop.test.js.framework=${test.basic.dir}/run-octane.js
    6.12 @@ -163,7 +163,7 @@
    6.13  octane-test-sys-prop.test.js.exclude.list=base.js
    6.14  
    6.15  # test root for sunspider
    6.16 -sunspider-test-sys-prop.test.js.roots=${test.external.dir}/sunspider/
    6.17 +sunspider-test-sys-prop.test.js.roots=${test.external.dir}/sunspider/tests/sunspider-1.0/
    6.18  
    6.19  # framework root for sunspider
    6.20  sunspider-test-sys-prop.test.js.framework=${test.basic.dir}/runsunspider.js
     7.1 --- a/test/script/basic/run-octane.js	Wed Jan 09 15:02:48 2013 +0100
     7.2 +++ b/test/script/basic/run-octane.js	Wed Jan 09 22:32:40 2013 +0530
     7.3 @@ -52,7 +52,7 @@
     7.4  var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
     7.5  
     7.6  // TODO: why is this path hard coded when it's defined in project properties?
     7.7 -var path = dir + "../external/octane/benchmarks/";
     7.8 +var path = dir + "../external/octane/";
     7.9  
    7.10  var runtime = "";
    7.11  var verbose = false;
     8.1 --- a/test/script/basic/runsunspider.js	Wed Jan 09 15:02:48 2013 +0100
     8.2 +++ b/test/script/basic/runsunspider.js	Wed Jan 09 22:32:40 2013 +0530
     8.3 @@ -121,30 +121,29 @@
     8.4  } 
     8.5  
     8.6  var tests = [
     8.7 -	     'check-3d-cube.js',
     8.8 -	     'check-access-nsieve.js',
     8.9 -	     'check-crypto-aes.js',   
    8.10 -	     'check-math-spectral-norm.js',
    8.11 -	     'check-3d-morph.js',
    8.12 -	     'check-bitops-3bit-bits-in-byte.js',
    8.13 -	     'check-crypto-md5.js',
    8.14 -	     'check-mont.js',
    8.15 -	     'check-3d-raytrace.js',
    8.16 -	     'check-bitops-bits-in-byte.js',
    8.17 -	     'check-crypto-sha1.js',
    8.18 -	     'check-regexp-dna.js',
    8.19 -	     'check-access-binary-trees.js',
    8.20 -	     'check-bitops-bitwise-and.js',
    8.21 -	     'check-date-format-tofte.js',
    8.22 -	     'check-string-fasta.js',
    8.23 -	     'check-access-fannkuch.js',
    8.24 -	     'check-bitops-nsieve-bits.js',
    8.25 -	     'check-math-cordic.js',
    8.26 -	     'check-string-tagcloud.js',
    8.27 -	     'check-access-nbody.js',
    8.28 -	     'check-controlflow-recursive.js',
    8.29 -	     'check-math-partial-sums.js',
    8.30 -	     'check-string-unpack-code.js'
    8.31 +	     '3d-cube.js',
    8.32 +	     'access-nsieve.js',
    8.33 +	     'crypto-aes.js',   
    8.34 +	     'math-spectral-norm.js',
    8.35 +	     '3d-morph.js',
    8.36 +	     'bitops-3bit-bits-in-byte.js',
    8.37 +	     'crypto-md5.js',
    8.38 +	     '3d-raytrace.js',
    8.39 +	     'bitops-bits-in-byte.js',
    8.40 +	     'crypto-sha1.js',
    8.41 +	     'regexp-dna.js',
    8.42 +	     'access-binary-trees.js',
    8.43 +	     'bitops-bitwise-and.js',
    8.44 +	     'date-format-tofte.js',
    8.45 +	     'string-fasta.js',
    8.46 +	     'access-fannkuch.js',
    8.47 +	     'bitops-nsieve-bits.js',
    8.48 +	     'math-cordic.js',
    8.49 +	     'string-tagcloud.js',
    8.50 +	     'access-nbody.js',
    8.51 +	     'controlflow-recursive.js',
    8.52 +	     'math-partial-sums.js',
    8.53 +	     'string-unpack-code.js'
    8.54  	     ];
    8.55  
    8.56  // handle the case this script may be run by a JS engine that doesn't
    8.57 @@ -152,7 +151,7 @@
    8.58  var dir = (typeof(__DIR__) == 'undefined')? "test/script/basic/" : __DIR__;
    8.59  
    8.60  for (i in tests) {
    8.61 -    tests[i] = dir + '../external/sunspider/' + tests[i];
    8.62 +    tests[i] = dir + '../external/sunspider/tests/sunspider-1.0/' + tests[i];
    8.63  }
    8.64  
    8.65  var verbose_run = false;
     9.1 --- a/test/src/jdk/nashorn/internal/codegen/CompilerTest.java	Wed Jan 09 15:02:48 2013 +0100
     9.2 +++ b/test/src/jdk/nashorn/internal/codegen/CompilerTest.java	Wed Jan 09 22:32:40 2013 +0530
     9.3 @@ -43,8 +43,6 @@
     9.4  public class CompilerTest {
     9.5      private static final boolean VERBOSE  = Boolean.valueOf(System.getProperty("compilertest.verbose"));
     9.6      private static final boolean TEST262  = Boolean.valueOf(System.getProperty("compilertest.test262"));
     9.7 -
     9.8 -    private static final String ES5CONFORM_DIR    = System.getProperty("es5conform.testcases.dir");
     9.9      private static final String TEST_BASIC_DIR  = System.getProperty("test.basic.dir");
    9.10      private static final String TEST262_SUITE_DIR = System.getProperty("test262.suite.dir");
    9.11  
    9.12 @@ -90,7 +88,6 @@
    9.13                  }
    9.14              });
    9.15          }
    9.16 -        compileTestSet(ES5CONFORM_DIR, null);
    9.17          compileTestSet(TEST_BASIC_DIR, null);
    9.18      }
    9.19  
    10.1 --- a/test/src/jdk/nashorn/internal/parser/ParserTest.java	Wed Jan 09 15:02:48 2013 +0100
    10.2 +++ b/test/src/jdk/nashorn/internal/parser/ParserTest.java	Wed Jan 09 22:32:40 2013 +0530
    10.3 @@ -43,7 +43,6 @@
    10.4      private static final boolean VERBOSE   = Boolean.valueOf(System.getProperty("parsertest.verbose"));
    10.5      private static final boolean TEST262   = Boolean.valueOf(System.getProperty("parsertest.test262"));
    10.6  
    10.7 -    private static final String ES5CONFORM_DIR    = System.getProperty("es5conform.testcases.dir");
    10.8      private static final String TEST_BASIC_DIR  = System.getProperty("test.basic.dir");
    10.9      private static final String TEST262_SUITE_DIR = System.getProperty("test262.suite.dir");
   10.10  
   10.11 @@ -80,7 +79,6 @@
   10.12                  }
   10.13              });
   10.14          }
   10.15 -        parseTestSet(ES5CONFORM_DIR, null);
   10.16          parseTestSet(TEST_BASIC_DIR, null);
   10.17      }
   10.18  

mercurial