diff options
Diffstat (limited to 'make/build.xml')
-rw-r--r-- | make/build.xml | 88 |
1 files changed, 61 insertions, 27 deletions
diff --git a/make/build.xml b/make/build.xml index 35877aef..3b30a089 100644 --- a/make/build.xml +++ b/make/build.xml @@ -193,14 +193,16 @@ </jar> </target> - <target name="javadoc" depends="prepare"> - <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" windowtitle="${nashorn.product.name} ${nashorn.version}" additionalparam="-quiet" failonerror="true"> + <target name="javadoc" depends="jar"> + <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" + extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}" + additionalparam="-quiet" failonerror="true"> <classpath> <pathelement location="${build.classes.dir}"/> </classpath> <fileset dir="${src.dir}" includes="**/*.java"/> <fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/> - <link href="http://docs.oracle.com/javase/7/docs/api/"/> + <link href="http://docs.oracle.com/javase/8/docs/api/"/> <!-- The following tags are used only in ASM sources - just ignore these --> <tag name="label" description="label tag in ASM sources" enabled="false"/> <tag name="linked" description="linked tag in ASM sources" enabled="false"/> @@ -208,6 +210,19 @@ </javadoc> </target> + <!-- generate javadoc only for nashorn extension api classes --> + <target name="javadocapi" depends="jar"> + <javadoc destdir="${dist.javadoc.dir}" use="yes" extdirs="${nashorn.ext.path}" + windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true"> + <classpath> + <pathelement location="${build.classes.dir}"/> + </classpath> + <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/> + <link href="http://docs.oracle.com/javase/8/docs/api/"/> + </javadoc> + </target> + + <!-- generate shell.html for shell tool documentation --> <target name="shelldoc" depends="jar"> <java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true"> @@ -336,52 +351,71 @@ grant codeBase "file:/${basedir}/test/script/basic/classloader.js" { <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/> </target> - <target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available"> - <fileset id="test.classes" dir="${build.test.classes.dir}"> - <include name="**/api/javaaccess/*Test.class"/> - <include name="**/api/scripting/*Test.class"/> - <include name="**/codegen/*Test.class"/> - <include name="**/parser/*Test.class"/> - <include name="**/runtime/*Test.class"/> - <include name="**/runtime/regexp/*Test.class"/> - <include name="**/runtime/regexp/joni/*Test.class"/> - <include name="**/framework/*Test.class"/> - </fileset> + <!-- only to be invoked as dependency of "test" target --> + <target name="-test-classes-all" depends="jar" unless="test.class"> + <fileset id="test.classes" dir="${build.test.classes.dir}"> + <include name="**/api/javaaccess/*Test.class"/> + <include name="**/api/scripting/*Test.class"/> + <include name="**/codegen/*Test.class"/> + <include name="**/parser/*Test.class"/> + <include name="**/runtime/*Test.class"/> + <include name="**/runtime/regexp/*Test.class"/> + <include name="**/runtime/regexp/joni/*Test.class"/> + <include name="**/framework/*Test.class"/> + </fileset> + </target> + <!-- only to be invoked as dependency of "test" target --> + <target name="-test-classes-single" depends="jar" if="test.class"> + <fileset id="test.classes" dir="${build.test.classes.dir}"> + <include name="${test.class}*"/> + </fileset> + </target> + + <!-- only to be invoked as dependency of "test" target --> + <target name="-test-nosecurity" unless="test.class"> <fileset id="test.nosecurity.classes" dir="${build.test.classes.dir}"> <include name="**/framework/ScriptTest.class"/> </fileset> - - <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" + <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes" verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> <jvmarg line="${ext.class.path}"/> - <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> + <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/> <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> + <propertyref prefix="nashorn."/> + </propertyset> + <propertyset> + <propertyref prefix="test-sys-prop-no-security."/> + <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/> </propertyset> - <sysproperty key="test.js.excludes.file" value="${exclude.list}"/> <classpath> <pathelement path="${run.test.classpath}"/> </classpath> </testng> - <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes" + </target> + + <!-- only to be invoked as dependency of "test" target --> + <target name="-test-security"> + <delete dir="${build.dir}/nashorn_code_cache"/> + <property name="debug.test.jvmargs" value=""/> + <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes" verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}"> <jvmarg line="${ext.class.path}"/> - <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/> - <propertyset> - <propertyref prefix="nashorn."/> - </propertyset> + <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/> + <jvmarg line="${debug.test.jvmargs}"/> <propertyset> - <propertyref prefix="test-sys-prop-no-security."/> - <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> </propertyset> + <sysproperty key="test.js.excludes.file" value="${exclude.list}"/> <classpath> <pathelement path="${run.test.classpath}"/> </classpath> </testng> </target> + <target name="test" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file, -test-security, -test-nosecurity" if="testng.available"/> + <target name="test-basicparallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file"> <!-- use just build.test.classes.dir to avoid referring to TestNG --> <java classname="${parallel.test.runner}" dir="${basedir}" classpath="${build.test.classes.dir}" failonerror="true" fork="true"> |