Skip to content

Commit

Permalink
update SpecJBB job from initial TRSS testing (adoptium#5)
Browse files Browse the repository at this point in the history
* update SpecJBB job from initial TRSS testing

* fix bug

* fixup

* rewrite getSpecjbbSuite.sh using antfile
  • Loading branch information
gdams authored and ahmedmuhsin committed Mar 2, 2023
1 parent 44cd1df commit a5b33ef
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 102 deletions.
4 changes: 2 additions & 2 deletions perf/specjbb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export SPECJBB_SRC=/Users/aqa-tester/SPECjbb2015-1.03

## Run

The configuration currently includes one group, `extended`, and that group contains one test, `specjbb-multijvm-simple`. You can use the following commands to run it:
The configuration currently includes one group, `extended`, and that group contains one test, `SPECjbb2015-multijvm-simple`. You can use the following commands to run it:
```
make _testList TESTLIST=specjbb-multijvm-simple
make _testList TESTLIST=SPECjbb2015-multijvm-simple
```
86 changes: 66 additions & 20 deletions perf/specjbb/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,84 @@
<!-- set global properties for this build -->
<property name="DEST" value="${BUILD_ROOT}/perf/specjbb" />
<property name="SRC" location="." />
<property environment="env"/>
<property name="SPECJBB_DEST" value="${DEST}/suite" />
<property name="SPECJBB_SRC" value="${env.SPECJBB_SRC}" />
<property name="JAVA_BIN" value="${env.TEST_JDK_HOME}/bin/java"/>
<property name="SPECJBB_JAR" value="specjbb2015.jar"/>

<target name="init">
<mkdir dir="${DEST}" />
</target>

<target name="getSpecjbbSuite" depends="init">

<property environment="env"/>
<property name="SPECJBB_DEST" value="${DEST}/suite" />
<property name="SPECJBB_SRC" value="${env.SPECJBB_SRC}" />
<property name="JAVA_BIN" value="${env.TEST_JDK_HOME}/bin/java"/>
<property name="SPECJBB_JAR" value="specjbb2015.jar"/>
<property name="SCRIPT_LOG" value="${DEST}/getSpecjbbSuite.log"/>
<property name="SCRIPT_SUCCESS" value="0"/>
<target name="exists">
<property name="specjbb_dir" value="${dir}"/>
<condition property="exists.exists">
<and>
<available file="${specjbb_dir}/${SPECJBB_JAR}" type="file"/>
</and>
</condition>
</target>

<exec executable="bash" failifexecutionfails="true" output="${SCRIPT_LOG}" resultproperty="SCRIPT_RESULT">
<env key="SPECJBB_DEST" value="${SPECJBB_DEST}"/>
<env key="SPECJBB_SRC" value="${SPECJBB_SRC}"/>
<env key="JAVA_BIN" value="${JAVA_BIN}"/>
<env key="SPECJBB_JAR" value="${SPECJBB_JAR}"/>
<arg value="${SRC}/build/getSpecjbbSuite.sh"/>
<target name="isRunnable">
<exec executable="${JAVA_BIN}" resultproperty="isRunnable.result" >
<arg line="-jar ${specjbb_dir}/${SPECJBB_JAR} -m COMPOSITE -h"/>
</exec>

<fail message="Failed to get SPECjbb suite. See the following file for more info: ${SCRIPT_LOG}">
<fail message="Failed to run SPECjbb suite.">
<condition>
<not>
<equals arg1="${SCRIPT_RESULT}" arg2="${SCRIPT_SUCCESS}"/>
<equals arg1="${isRunnable.result}" arg2="0"/>
</not>
</condition>
</fail>
</fail>
</target>

<target name="dirIsValid">
<antcall target="exists">
<param name="specjbb_dir" value="${dir}"/>
</antcall>
<antcall target="isRunnable">
<param name="specjbb_dir" value="${dir}"/>
</antcall>
</target>

<target name="dstIsValid">
<echo message="##### Validating destination SPECjbb dir"/>
<antcall target="dirIsValid">
<param name="dir" value="${SPECJBB_DEST}"/>
</antcall>
<condition property="dstIsValid.result">
<isset property="dirIsValid.result"/>
</condition>
</target>

<target name="srcIsValid">
<echo message="##### Validating source SPECjbb dir"/>
<antcall target="dirIsValid">
<param name="dir" value="${SPECJBB_SRC}"/>
</antcall>
</target>

<target name="copySrcToDst">
<echo message="##### Copying contents of source SPECjbb dir to destination SPECjbb dir"/>
<copy todir="${SPECJBB_DEST}">
<fileset dir="${SPECJBB_SRC}"/>
</copy>
</target>

<target name="printInput">
<echo message="SPECJBB_SRC ${SPECJBB_SRC}"/>
<echo message="SPECJBB_DEST ${SPECJBB_DEST}"/>
<echo message="SPECJBB_JAR ${SPECJBB_JAR}"/>
<echo message="JAVA_BIN ${JAVA_BIN}"/>
</target>

</target>
<target name="getSpecjbbSuite" depends="init">
<antcall target="printInput"/>
<antcall target="srcIsValid"/>
<antcall target="copySrcToDst"/>
<antcall target="dstIsValid"/>
</target>

<target name="dist" depends="getSpecjbbSuite" description="generate the distribution">
<copy todir="${DEST}/run">
Expand Down
77 changes: 0 additions & 77 deletions perf/specjbb/build/getSpecjbbSuite.sh

This file was deleted.

4 changes: 2 additions & 2 deletions perf/specjbb/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/playlist.xsd">
<include>run/testenv.mk</include>
<test>
<testCaseName>specjbb-multijvm-simple</testCaseName>
<command>source $(RUN_OPTIONS)/specjbb-multijvm-simple.sh; bash $(RUN_SCRIPTS)/run_multi.sh; $(TEST_STATUS)</command>
<testCaseName>SPECjbb2015-multijvm-simple</testCaseName>
<command>. $(RUN_OPTIONS)/specjbb-multijvm-simple.sh; bash $(RUN_SCRIPTS)/run_multi.sh; $(TEST_STATUS)</command>
<levels>
<level>extended</level>
</levels>
Expand Down
2 changes: 1 addition & 1 deletion perf/specjbb/run/run_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for ((n=1; $n<=$NUM_OF_RUNS; n=$n+1)); do
JAVA="${JAVA%\"}"
JAVA="${JAVA#\"}"
echo "Start Controller JVM"
$JAVA $JAVA_OPTS_C $SPECJBB_OPTS_C -jar $SPECJBB_JAR -m MULTICONTROLLER $MODE_ARGS_C 2>controller.log > controller.out &
$JAVA $JAVA_OPTS_C $SPECJBB_OPTS_C -jar $SPECJBB_JAR -m MULTICONTROLLER $MODE_ARGS_C 2>controller.log 2>&1 | tee controller.out &

CTRL_PID=$!
echo "Controller PID = $CTRL_PID"
Expand Down

0 comments on commit a5b33ef

Please sign in to comment.