Skip to content

Commit

Permalink
Pre-stage system test libs on the machines
Browse files Browse the repository at this point in the history
- added system_lib_dir env property to top.xml
- added condition to check the if the system_lib_dir property is set

related: adoptium/aqa-tests#4912

Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed May 21, 2024
1 parent f8d647e commit 13ff485
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions stf.build/include/top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -19,14 +19,18 @@ limitations under the License.
<!-- Set a property for accessing environment variables. -->
<property environment="env"/>

<condition property="system_lib_dir" value="${env.SYSTEM_LIB_DIR}" else="${source_root}/../../systemtest_prereqs">
<isset property="env.SYSTEM_LIB_DIR"/>
</condition>

<echo message="System Library Directory: ${system_lib_dir}"/>
<!-- Set default prereqs_root. -->
<!-- If source has been checked out to /home/user/git/stf, default location for prereqs is /home/user/systemtest_prereqs. -->
<property name="prereqs_root" location="${source_root}/../../systemtest_prereqs"/>
<property name="prereqs_root" location="${system_lib_dir}"/>

<!-- Test specific prereqs may have been added to prereqs-root (in path1;path2;path3 notation).
Here the property first_prereqs_root is set containing just the first path in prereqs_root
which is assumed to be where the make configure prereqs are installed. -->
<property name="prereqs_root" location="${source_root}/../../systemtest_prereqs"/>
Here the property first_prereqs_root is set containing just the first path in prereqs_root
which is assumed to be where the make configure prereqs are installed. -->
<loadresource property="first_prereqs_root" encoding="UTF-8">
<concat>${prereqs_root}</concat>
<filterchain>
Expand All @@ -37,7 +41,7 @@ limitations under the License.
<!-- Platform dependent settings. -->
<condition property="exe_suffix" value=".exe" else="" >
<os family="windows" />
</condition>
</condition>
<condition property="is_windows" value="true" else="false" >
<os family="windows" />
</condition>
Expand Down Expand Up @@ -182,7 +186,7 @@ limitations under the License.
<property name="ant_dir" location="${first_prereqs_root}/apache-ant"/>
<property name="ant_file" value="lib/ant-launcher.jar"/>
<property name="ant" location="${ant_dir}/${ant_file}"/>
<available file="${ant}" property="ant_available"/>
<available file="${ant}" property="ant_available"/>
</target>

<!--
Expand All @@ -195,7 +199,7 @@ limitations under the License.
<unzip src="${java.io.tmpdir}/apache-ant/apache-ant-bin.zip" dest="${java.io.tmpdir}/apache-ant"/>
<copydir src="${java.io.tmpdir}/apache-ant/apache-ant-${ant-version}" dest="${first_prereqs_root}/apache-ant"/>
<delete dir="${java.io.tmpdir}/apache-ant"/>
<available file="${ant}" property="ant_available"/>
<available file="${ant}" property="ant_available"/>
</target>

<!-- Target to check if junit is available. -->
Expand Down Expand Up @@ -271,7 +275,7 @@ limitations under the License.
<target name="check-for-windows-sysinternals" unless="check_prereqs_run">
<property name="windows_sysinternals_dir" location="${first_prereqs_root}/windows_sysinternals"/>
<!-- We're just using the existence of pskill.exe to determine whether the tools are installed. -->
<available file="${windows_sysinternals_dir}/pskill.exe" property="windows_sysinternals_available"/>
<available file="${windows_sysinternals_dir}/pskill.exe" property="windows_sysinternals_available"/>
</target>

<target name="set-download-windows-sysinternals-required">
Expand All @@ -282,7 +286,7 @@ limitations under the License.
<isset property="windows_sysinternals_available"/>
</not>
</and>
</condition>
</condition>
</target>
<!--
Get the windows sysinternals tools from https://download.sysinternals.com/files/SysinternalsSuite.zip
Expand All @@ -293,7 +297,7 @@ limitations under the License.
<unzip src="${java.io.tmpdir}/windows_sysinternals/SysinternalsSuite.zip" dest="${windows_sysinternals_dir}"/>
<delete dir="${java.io.tmpdir}/windows_sysinternals"/>
<!-- We're just using the existence of pskill.exe to determine whether the tools are installed. -->
<available file="${windows_sysinternals_dir}/pskill.exe" property="windows_sysinternals_available"/>
<available file="${windows_sysinternals_dir}/pskill.exe" property="windows_sysinternals_available"/>
</target>
<!--
Target to check if there is a tools.jar already copied to PREREQS_ROOT/tools.
Expand All @@ -317,7 +321,7 @@ limitations under the License.
</and>
</or>
</condition>
<available file="${tools_jar_dir}/${tools_jar_file}" property="tools_jar" value="${tools_jar_dir}/${tools_jar_file}"/>
<available file="${tools_jar_dir}/${tools_jar_file}" property="tools_jar" value="${tools_jar_dir}/${tools_jar_file}"/>
</target>

<!--
Expand Down Expand Up @@ -361,10 +365,10 @@ limitations under the License.
</condition>

<condition property="MAKE" value="gmake" else="make">
<or>
<equals arg1="${os.name}" arg2="AIX"/>
<contains string="${os.name}" substring="BSD"/>
</or>
<or>
<equals arg1="${os.name}" arg2="AIX"/>
<contains string="${os.name}" substring="BSD"/>
</or>
</condition>

<macrodef name="download-file" description="Use curl to download a file">
Expand Down Expand Up @@ -456,7 +460,7 @@ limitations under the License.
<isset property="windows_sysinternals_available"/>
</not>
</and>
</condition>
</condition>
</target>

<target name="really-print-windows-sysinternals-error" if="${print_windows_sysinternals_error_required}">
Expand Down

0 comments on commit 13ff485

Please sign in to comment.