make/build.xml

changeset 1036
8a99ee1fb375
parent 991
b7a2db4de254
child 1055
3736ebef15e9
     1.1 --- a/make/build.xml	Thu Oct 09 11:56:42 2014 +0200
     1.2 +++ b/make/build.xml	Thu Oct 09 10:19:24 2014 +0200
     1.3 @@ -78,7 +78,7 @@
     1.4        <istrue value="${jfr}"/>
     1.5      </condition>
     1.6    </target>
     1.7 -
     1.8 +  
     1.9    <target name="init" depends="init-conditions, init-cc">
    1.10      <!-- extends jvm args -->
    1.11      <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
    1.12 @@ -419,6 +419,7 @@
    1.13          <propertyref prefix="test-sys-prop-no-security."/>
    1.14          <mapper from="test-sys-prop-no-security.*" to="*" type="glob"/>
    1.15        </propertyset>
    1.16 +      <sysproperty key="optimistic.override" value="${optimistic}"/>
    1.17        <classpath>
    1.18            <pathelement path="${run.test.classpath}"/>
    1.19        </classpath>
    1.20 @@ -430,7 +431,7 @@
    1.21      <delete dir="${build.dir}/nashorn_code_cache"/>
    1.22      <property name="debug.test.jvmargs" value=""/>
    1.23      <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
    1.24 -       verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
    1.25 +	    verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
    1.26        <jvmarg line="${ext.class.path}"/>
    1.27        <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
    1.28        <jvmarg line="${debug.test.jvmargs}"/>
    1.29 @@ -441,6 +442,7 @@
    1.30          <propertyref prefix="test-sys-prop."/>
    1.31          <mapper from="test-sys-prop.*" to="*" type="glob"/>
    1.32        </propertyset>
    1.33 +      <sysproperty key="optimistic.override" value="${optimistic}"/>
    1.34        <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
    1.35        <classpath>
    1.36            <pathelement path="${run.test.classpath}"/>
    1.37 @@ -448,7 +450,27 @@
    1.38      </testng>
    1.39    </target>
    1.40  
    1.41 -  <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"/>
    1.42 +  <target name="test" depends="test-pessimistic, test-optimistic"/>
    1.43 +
    1.44 +  <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
    1.45 +    <echo message="Running test suite in OPTIMISTIC mode..."/>
    1.46 +    <antcall target="-test-nosecurity" inheritRefs="true">
    1.47 +      <param name="optimistic" value="true"/>
    1.48 +    </antcall>    
    1.49 +    <antcall target="-test-security" inheritRefs="true">
    1.50 +      <param name="optimistic" value="true"/>
    1.51 +    </antcall>
    1.52 +  </target>
    1.53 +
    1.54 +  <target name="test-pessimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
    1.55 +    <echo message="Running test suite in PESSIMISTIC mode..."/>
    1.56 +    <antcall target="-test-nosecurity" inheritRefs="true">
    1.57 +      <param name="optimistic" value="false"/>
    1.58 +    </antcall>    
    1.59 +    <antcall target="-test-security" inheritRefs="true">
    1.60 +      <param name="optimistic" value="false"/>
    1.61 +    </antcall>
    1.62 +  </target>
    1.63  
    1.64    <target name="check-jemmy.jfx.testng" unless="jemmy.jfx.testng.available">
    1.65      <echo message="WARNING: Jemmy or JavaFX or TestNG not available, will not run tests. Please copy testng.jar, JemmyCore.jar, JemmyFX.jar, JemmyAWTInput.jar under test${file.separator}lib directory. And make sure you have jfxrt.jar in ${java.home}${file.separator}lib${file.separator}ext dir."/>

mercurial