Skip to content

Commit

Permalink
Remove com.test.jlink to eliminate xlC dependency
Browse files Browse the repository at this point in the history
- Remove com.test.jlink to eliminate xlC dependency in system tests

related:adoptium/aqa-tests#5965
Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed Feb 26, 2025
1 parent 69cfb9d commit edf49c3
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 569 deletions.
52 changes: 4 additions & 48 deletions openjdk.test.modularity/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ limitations under the License.
<echo message="can_build_modularity_natives_windows is ${can_build_modularity_natives_windows}"/>
</target>

<target name="build-no-natives" depends="check-prereqs, check-compiler-level, build-java, build-javah">
<target name="build-no-natives" depends="check-prereqs, check-compiler-level, build-java">
</target>

<target name="build-java" depends="check-prereqs, create-bin-dir" if="${can_build_modularity}">
Expand Down Expand Up @@ -189,11 +189,6 @@ limitations under the License.
includes="**/*.properties" />
</copy>

<copy todir="${openjdk_test_modularity_bin_dir}/tests/com.test.jlink/conf">
<fileset dir="${openjdk_test_modularity_src_dir}/tests/com.test.jlink/conf"
includes="**/*.properties" />
</copy>

<apply executable="${java_compiler}" failonerror="true" parallel="true">
<arg value="-d" />
<arg value="${openjdk_test_modularity_bin_dir}/common" />
Expand Down Expand Up @@ -266,55 +261,16 @@ limitations under the License.
<echo message="openjdk_test_modularity_javac_did_not_run is ${openjdk_test_modularity_javac_did_not_run}" />
</target>

<target name="build-javah" depends="check-prereqs, check-if-javac_ran" unless="javac_did_not_run">
<!-- Build JNI header files. -->
<!--From Java10, the 'javah' executable has been replaced with 'javac with options'. -->

<property name="openjdk_test_modularity_javah_src" value="${openjdk_test_modularity_src_dir}/tests/com.test.jlink/adoptopenjdk/test/modularity/jlink/JniTest.java"/>
<property name="openjdk_test_modularity_headerdir" value="${openjdk_test_modularity_jlink_nativedir}/lib"/>
<mkdir dir="${openjdk_test_modularity_headerdir}" />

<!-- First delete the header file -->
<delete includeemptydirs="true" verbose="true">
<fileset dir="${openjdk_test_modularity_headerdir}" includes="adoptopenjdk_test_modularity_jlink_JniTest.h"/>
</delete>

<!-- Then recreate it -->
<echo message="Building JNI header file for JniTest to ${openjdk_test_modularity_headerdir}" />
<exec executable="${java_compiler}" failonerror="true">
<arg value="-classpath"/>
<arg pathref="jlink.project.class.path" />
<arg value="-h"/>
<arg value="${openjdk_test_modularity_headerdir}"/>
<arg value="-d"/>
<arg value="${openjdk_test_modularity_bin_dir}"/>
<arg value="${openjdk_test_modularity_javah_src}"/>
</exec>
</target>

<target name="build-natives" depends="check-prereqs, check-compiler-level, setup-native-build-command, build-natives-windows, build-natives-unix">

<target name="build-natives" depends="check-prereqs, check-compiler-level, setup-native-build-command">
</target>

<target name="setup-native-build-command" if="${can_build_modularity}">
<echo message="building natives for java_platform ${java_platform}"/>
<property name="openjdk_test_modularity_native_build_command" value='${setup_windows_build_env}${MAKE} -C ${openjdk_test_modularity_jlink_testcase_src}/native SRC=${openjdk_test_modularity_native_src} JAVA_HOME=${java_home} OUTDIR=${openjdk_test_modularity_jlink_outdir} HEADERDIR=${openjdk_test_modularity_jlink_headerdir} OSNAME=${java_osname}'/>
<tempfile property="openjdk_test_modularity_native_build_command_file" destDir="${java.io.tmpdir}" prefix="openjdk.build.command."/>
</target>

<target name="build-natives-windows" if="${can_build_modularity_natives_windows}">
<echo message="${openjdk_test_modularity_native_build_command}" file="${openjdk_test_modularity_native_build_command_file}.bat"/>
<exec executable="${openjdk_test_modularity_native_build_command_file}.bat" failonerror="true"/>
<delete file="${openjdk_test_modularity_native_build_command_file}.bat" verbose="true"/>
</target>

<target name="build-natives-unix" if="${can_build_modularity_natives_unix}">
<echo message="${openjdk_test_modularity_native_build_command}" file="${openjdk_test_modularity_native_build_command_file}.sh"/>
<exec executable="/bin/sh" failonerror="true">
<arg value="${openjdk_test_modularity_native_build_command_file}.sh"/>
</exec>
<delete file="${openjdk_test_modularity_native_build_command_file}.sh" verbose="true"/>
</target>


<target name="clean">
<delete dir="${openjdk_test_modularity_bin_dir}"/>
</target>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions openjdk.test.modularity/src/tests/com.test.jlink/module-info.java

This file was deleted.

46 changes: 0 additions & 46 deletions openjdk.test.modularity/src/tests/com.test.jlink/native/JniTest.c

This file was deleted.

Loading

0 comments on commit edf49c3

Please sign in to comment.