Skip to content

Commit

Permalink
Support personal openj9 sha without branch (#3184)
Browse files Browse the repository at this point in the history
Currently, we take both OPENJ9_BRANCH and OPENJ9_SHA. However, in testenv.properties, we only output one value
 - OPENJ9_SHA (adoptium/TKG#255). We will not have branch information. The logic in `get.sh` was highly optimized
 to have minimal checkout for openj9 repo (i.e., we do not fetch other branches). This causes a problem as it is
 not able to git clone with sha only (if the sha is from other branch).

This PR adds the support to git clone personal openj9 sha without branch info, so we can consume the OPENJ9_SHA
without OPENJ9_BRNACH info.

Related: adoptium/TKG#255
Related: #2889

Signed-off-by: lanxia lan_xia@ca.ibm.com
  • Loading branch information
llxia authored Dec 30, 2021
1 parent adfc0a9 commit 727a6ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,13 @@ getFunctionalTestMaterial()
echo "git fetch -q --tags $OPENJ9_REPO +refs/pull/*:refs/remotes/origin/pr/*"
git fetch -q --tags $OPENJ9_REPO +refs/pull/*:refs/remotes/origin/pr/*
echo "git checkout -q $OPENJ9_SHA"
git checkout -q $OPENJ9_SHA
if ! git checkout $OPENJ9_SHA; then
echo "SHA not yet found. Continue fetching all the branches on origin..."
echo "git fetch -q --tags $OPENJ9_REPO +refs/heads/*:refs/remotes/origin/*"
git fetch -q --tags $OPENJ9_REPO +refs/heads/*:refs/remotes/origin/*
echo "git checkout -q $OPENJ9_SHA"
git checkout $OPENJ9_SHA
fi
fi
cd $TESTDIR
fi
Expand Down

0 comments on commit 727a6ef

Please sign in to comment.