<project name="vmopts-test" default="go" basedir="../../make">

    <property name="build.jtreg" value="../build/jtreg"/>
    <property name="vmopts.tests" value="../test/vmopts"/>

    <property name="jtreg.jar" value="dist/lib/jtreg.jar"/>
    <property name="testjdk" value="/tl/jdk/1.6.0"/>

    <target name="go" depends="defs,args.othervm,args.agentvm,fileset.othervm,fileset.agentvm"/>

    <target name="defs">
        <taskdef name="jtreg"
            classname="com.sun.javatest.regtest.Main$$Ant"
            classpath="${jtreg.jar}"
        />
    </target>

    <target name="args.othervm">
        <jtreg
            jdk="${testjdk}"
            workDir="${build.jtreg}/ant-args.othervm/work"
            reportDir="${build.jtreg}/ant-args.othervm/report"
            verbose="fail" >
            <arg value="-Dfoo=bar" />
            <arg value="-Xbootclasspath/p:baz.jar" />
            <arg file="${vmopts.tests}" />
        </jtreg>
    </target>

    <target name="args.agentvm">
        <jtreg
            agentvm="true"
            jdk="${testjdk}"
            workDir="${build.jtreg}/ant-args.agentvm/work"
            reportDir="${build.jtreg}/ant-args.agentvm/report"
            verbose="fail" >
            <arg value="-Dfoo=bar" />
            <arg value="-Xbootclasspath/p:baz.jar" />
            <arg file="${vmopts.tests}" />
        </jtreg>
    </target>

    <target name="fileset.othervm">
        <jtreg
            jdk="${testjdk}"
            workDir="${build.jtreg}/ant-fileset.othervm/work"
            reportDir="${build.jtreg}/ant-fileset.othervm/report"
            dir="${vmopts.tests}"
            verbose="fail" >
            <arg value="-Dfoo=bar" />
            <arg value="-Xbootclasspath/p:baz.jar" />
            <include name="**"/>
        </jtreg>
    </target>

    <target name="fileset.agentvm">
        <jtreg
            agentvm="true"
            jdk="${testjdk}"
            workDir="${build.jtreg}/ant-fileset.agentvm/work"
            reportDir="${build.jtreg}/ant-fileset.agentvm/report"
            dir="${vmopts.tests}"
            verbose="fail" >
            <arg value="-Dfoo=bar" />
            <arg value="-Xbootclasspath/p:baz.jar" />
            <include name="**"/>
        </jtreg>
    </target>

</project>
