Skip to content

Commit

Permalink
api98 part2
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Mar 24, 2023
1 parent 29f1a14 commit fea501f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 49 deletions.
83 changes: 39 additions & 44 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@

<property file="${bin.dir}/ts.jte"/>
<property name="lib.dir" value="${ts.home}${file.separator}lib"/>
<property name="harness.dir" value="${ts.home}${file.separator}classes-harness"/>
<property name="harness.dir" value="${ts.home}${file.separator}classes-harness"/>
<property name="class.dir" value="${ts.home}${file.separator}classes"/>
<property name="class.pluggability.dir" value="${ts.home}${file.separator}classes-pluggability"/>
<property name="class.providers.dir" value="${ts.home}${file.separator}classes-providers"/>
<property name="class.pluggability.dir" value="${ts.home}${file.separator}classes-pluggability"/>
<property name="class.providers.dir" value="${ts.home}${file.separator}classes-providers"/>
<property name="tests.dir" value="${ts.home}${file.separator}tests"/>
<property name="work.dir" value="${ts.home}/JTwork"/>
<property name="report.api.dir" value="${ts.home}/JTreport"/>
<property name="report.pluggability.dir" value="${ts.home}/JTreport-Pluggability"/>
<mkdir dir="${harness.dir}"/>
<property name="report.pluggability.dir" value="${ts.home}/JTreport-Pluggability"/>
<mkdir dir="${harness.dir}"/>
<mkdir dir="${class.dir}"/>
<mkdir dir="${class.pluggability.dir}"/>
<mkdir dir="${class.providers.dir}"/>
<mkdir dir="${class.pluggability.dir}"/>
<mkdir dir="${class.providers.dir}"/>
<mkdir dir="${work.dir}"/>
<mkdir dir="${report.pluggability.dir}"/>
<mkdir dir="${report.pluggability.dir}"/>

<condition property="tests.arg" value="-tests ${tests}" else="">
<isset property="tests"/>
Expand All @@ -61,46 +61,43 @@
<isset property="debug"/>
</condition>

<property name="module.path" value="${API_JAR}"/>
<property name="class.path" value="${class.dir}${pathsep}${ts.home}/sigtest.jar${pathsep}${ts.home}/javatest.jar"/>
<property name="pluggability.class.path" value="${class.pluggability.dir}${pathsep}${ts.home}/javatest.jar"/>
<property name="module.path" value="${API_JAR}"/>
<property name="class.path" value="${class.dir}${pathsep}${ts.home}/sigtest.jar${pathsep}${ts.home}/javatest.jar${pathsep}${module.path}"/>
<property name="pluggability.class.path" value="${class.pluggability.dir}${pathsep}${ts.home}/javatest.jar${pathsep}${module.path}"/>

<!-- Does the current runtime support modules? -->
<condition property="jdk.modules" value="false" else="true">
<or>
<contains string="${java.version}" substring="1.7" />
<contains string="${java.version}" substring="1.8" />
</or>
<!-- anything else is JDK9+ -->
<or>
<contains string="${java.version}" substring="1.7" />
<contains string="${java.version}" substring="1.8" />
</or>
<!-- anything else is JDK9+ -->
</condition>
<condition property="java.classes.for.sig.ext"
value="lib/modules"
value="lib/modules"
else="lib/rt.jar">
<istrue value="${jdk.modules}"/>
<istrue value="${jdk.modules}"/>
</condition>

<target name="build"
description="Compiles all sources to the classes directory">
<javac includeantruntime="false" deprecation="yes"
release="11"
srcdir="tests/api"
classpath="${class.path}" modulepath="${module.path}" destdir="${class.dir}"
classpath="${class.path}" destdir="${class.dir}"
debug="on">
<compilerarg line="--add-modules ${api.module.name}"/>
</javac>
<javac includeantruntime="false" deprecation="yes"
release="11"
srcdir="tests/pluggability"
classpath="${class.path}" modulepath="${module.path}" destdir="${class.pluggability.dir}"
classpath="${class.path}" destdir="${class.pluggability.dir}"
debug="on">
<compilerarg line="--add-modules ${api.module.name}"/>
</javac>
<javac includeantruntime="false" deprecation="yes"
release="11"
srcdir="providers"
classpath="${class.path}" modulepath="${module.path}" destdir="${class.providers.dir}"
classpath="${class.path}" destdir="${class.providers.dir}"
debug="on">
<compilerarg line="--add-modules ${api.module.name}"/>
</javac>
<copy todir="${class.providers.dir}/META-INF">
<fileset dir="providers/META-INF"/>
Expand All @@ -109,9 +106,8 @@
<javac includeantruntime="false" deprecation="yes"
release="11"
srcdir="harness"
classpath="${class.path}" modulepath="${module.path}" destdir="${harness.dir}"
classpath="${class.path}" destdir="${harness.dir}"
debug="on">
<compilerarg line="--add-modules ${api.module.name}"/>
</javac>
<copy todir="${class.dir}">
<fileset dir="${harness.dir}"/>
Expand All @@ -125,42 +121,42 @@
<target name="clean"
description="Cleans all classes from the classes directory">
<delete failonerror="false" includeEmptyDirs="true">
<fileset dir="${harness.dir}" includes="*/**"/>
<fileset dir="${harness.dir}" includes="*/**"/>
<fileset dir="${class.dir}" includes="*/**"/>
<fileset dir="${class.pluggability.dir}" includes="*/**"/>
<fileset dir="${class.providers.dir}" includes="*/**"/>
<fileset dir="${class.pluggability.dir}" includes="*/**"/>
<fileset dir="${class.providers.dir}" includes="*/**"/>
</delete>
</target>

<target name="run"
description="Executes the JAF TCK in batch mode">
<local name="ts.jte"/>
<local name="ts.jte"/>
<local name="run.class.path"/>
<local name="report.dir"/>
<local name="test.suite"/>
<local name="ts.jtx"/>
<property name="report.dir" value="${report.api.dir}"/>
<property name="test.suite" value="tests/api"/>
<property name="ts.jte" value="ts.jte"/>
<property name="report.dir" value="${report.api.dir}"/>
<property name="test.suite" value="tests/api"/>
<property name="ts.jte" value="ts.jte"/>
<property name="ts.jtx" value="${ts.home}/lib/ts.jtx"/>
<property name="run.class.path" value="${class.path}"/>
<javatest.batch/>
</target>
<target name="run.pluggability"
description="Executes the JAF TCK pluggability tests in batch mode">

<target name="run.pluggability"
description="Executes the JAF TCK pluggability tests in batch mode">
<local name="ts.jte"/>
<local name="run.class.path"/>
<local name="report.dir"/>
<local name="test.suite"/>
<local name="test.suite"/>
<local name="ts.jtx"/>
<property name="report.dir" value="${report.pluggability.dir}"/>
<property name="test.suite" value="tests/pluggability"/>
<property name="ts.jte" value="ts.pluggability.jte"/>
<property name="ts.jtx" value="${ts.home}/lib/ts.jtx"/>
<property name="run.class.path" value="${pluggability.class.path}"/>
<javatest.batch/>
</target>
</target>

<target name="run.nojpms"
description="Executes the JAF TCK in CLASS-PATH mode in batch mode">
Expand Down Expand Up @@ -222,12 +218,11 @@
the javatest presetdef.
-->
<java classname="com.sun.javatest.tool.Main"
failonerror="${failOnError}" fork="yes" classpath="${run.class.path}" modulepath="${module.path}">
<jvmarg line="--add-modules ${api.module.name}"/>
<!--
<jvmarg line="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"/>
-->
<sysproperty key="testDebug" value="${tests.debug}"/>
failonerror="${failOnError}" fork="yes" classpath="${run.class.path}">
<!--
<jvmarg line="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"/>
-->
<sysproperty key="testDebug" value="${tests.debug}"/>
</java>
</presetdef>

Expand Down
6 changes: 1 addition & 5 deletions release.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -40,14 +40,10 @@
<sourcepath>
<pathelement location="${basedir}/tests/api"/>
</sourcepath>
<modulepath>
<pathelement path="${module.path}"/>
</modulepath>
<classpath>
<pathelement path="${class.path}"/>
</classpath>
<fileset dir="${basedir}/tests/api"/>
<arg line="--add-modules ${api.module.name}"/>
</javadoc>
</target>

Expand Down

0 comments on commit fea501f

Please sign in to comment.