Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stf sha issue #2913

Merged
merged 23 commits into from
Oct 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions system/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,46 +50,45 @@

<target name="clone_stf">
<echo message="git clone -q ${stf_repo} "/>
<exec executable="git" failonerror="false" dir="${SYSTEMTEST_ROOT}">
<exec executable="git" failonerror="true" dir="${SYSTEMTEST_ROOT}">
<arg value="clone" />
<arg value="-q"/>
<arg value="${stf_repo}"/>
</exec>

<echo message="git rev-parse ${stf_branch} "/>
<exec executable="git" failonerror="false" dir="${SYSTEMTEST_ROOT}/stf" outputproperty="stf_sha" resultproperty="code">
<exec executable="git" failonerror="false" dir="${SYSTEMTEST_ROOT}/stf" outputproperty="stf_sha1" resultproperty="code">
<arg value="rev-parse"/>
<arg value="${stf_branch}"/>
</exec>
<if>
<equals arg1="${code}" arg2="128"/>
<then>
<echo message="git rev-parse origin/${stf_branch}"/>
<exec executable="git" failonerror="false" dir="${SYSTEMTEST_ROOT}/stf" outputproperty="stf_sha" resultproperty="code2">
<exec executable="git" failonerror="true" dir="${SYSTEMTEST_ROOT}/stf" outputproperty="stf_sha2" resultproperty="code2">
<arg value="rev-parse"/>
<arg value="origin/${stf_branch}"/>
</exec>
<if>
<equals arg1="${code2}" arg2="128"/>
<then>
<echo message="This branch does not exist!"/>
</then>
</if>
</then>
<property name="stf_sha" value="${stf_sha2}"/>
</then>
</if>

<if>
<isset property="stf_sha"/>
<not>
<isset property="stf_sha"/>
</not>
<then>
<echo message="git checkout -q -f ${stf_sha} "/>
<exec executable="git" failonerror="true" dir="${SYSTEMTEST_ROOT}/stf" >
<arg value="checkout"/>
<arg value="-q"/>
<arg value="-f"/>
<arg value="${stf_sha}"/>
</exec>
<property name="stf_sha" value="${stf_sha1}"/>
</then>
</if>
<echo message="git checkout -q -f ${stf_sha} "/>
<exec executable="git" failonerror="true" dir="${SYSTEMTEST_ROOT}/stf" >
<arg value="checkout"/>
<arg value="-q"/>
<arg value="-f"/>
<arg value="${stf_sha}"/>
</exec>



<if>
<isset property="isZOS" />
Expand All @@ -114,7 +113,7 @@
</if>
<checkGitRepoSha repoDir="${SYSTEMTEST_ROOT}/stf" />
</target>

<target name="clone_systemtest">
<echo message="Cloning from: ${openjdk_systemtest_repo} -b ${openjdk_systemtest_branch}"/>
<exec executable="git" failonerror="false" dir="${SYSTEMTEST_ROOT}">
Expand Down Expand Up @@ -184,6 +183,7 @@
<checkGitRepoSha repoDir="${SYSTEMTEST_ROOT}/openj9-systemtest" />
</target>


<target name="check_systemtest" depends="common_init">
<if>
<not>
Expand Down