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

Move SHA check function to TKG #5819

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion functional/OpenJcePlusTests/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<arg value="-f"/>
<arg value="${repo_sha}"/>
</exec>
<checkGitRepoSha repoDir="OpenJCEPlus" />
<addTestenvProperties repoDir="OpenJCEPlus" repoName="OpenJCEPlus"/>

<delete dir="./OpenJCEPlus/src/main" />
Expand Down
1 change: 0 additions & 1 deletion functional/security/Crypto/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
</if>
<target name="getCryptoTest" depends="cryptoTest.check" unless="cryptoTestdir.exists">
<getFileWithRetry file="CryptoTest" command="git clone --depth 1 -q ${GIT_REPO}rh-openjdk/CryptoTest.git -b master CryptoTest"/>
<checkGitRepoSha repoDir="CryptoTest"/>
</target>

<target name="init">
Expand Down
35 changes: 13 additions & 22 deletions get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ getTestKitGen()
echo "git checkout -q -f $tkg_sha"
git checkout -q -f $tkg_sha

checkTestRepoSHAs
}

getCustomJtreg()
Expand Down Expand Up @@ -660,8 +659,13 @@ getFunctionalTestMaterial()
else
mv openj9/test/functional functional
fi

rm -rf openj9

cd openj9
mkdir -p ../git-backup
mv .git ../git-backup
rm -rf *
mv ../git-backup .git
Comment on lines +664 to +667
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should move .git file around. Can we move it into the subfolder? In this case, it should be functional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.git is not moved around. .git keeps in openj9/.git and all others under openj9 are removed. Same for all available vendors repo as vendor*/.git.
aqa-tests/functional may also have other vendor's test material. For example eclispe adoptium https://github.com/adoptium/temurin-build/tree/master/test/functional/ so it's not good to move .git to aqa-tests/functional

cd $TESTDIR
}

getVendorTestMaterial() {
Expand Down Expand Up @@ -746,7 +750,12 @@ getVendorTestMaterial() {
fi

# clean up
rm -rf $dest
cd $dest
mv .git ../git-backup
rm -rf *
mv ../git-backup .git
cd $TESTDIR

done
}

Expand Down Expand Up @@ -808,30 +817,12 @@ testJavaVersion()

checkRepoSHA()
{
sha_file="$TESTDIR/TKG/SHA.txt"
testenv_file="$TESTDIR/testenv/testenv.properties"

echo "$TESTDIR/TKG/scripts/getSHA.sh --repo_dir $1 --output_file $sha_file"
$TESTDIR/TKG/scripts/getSHA.sh --repo_dir $1 --output_file $sha_file

echo "$TESTDIR/TKG/scripts/getTestenvProperties.sh --repo_dir $1 --output_file $testenv_file --repo_name $2"
$TESTDIR/TKG/scripts/getTestenvProperties.sh --repo_dir $1 --output_file $testenv_file --repo_name $2
}

checkTestRepoSHAs()
{
echo "check adoptium repo and TKG repo SHA"

output_file="$TESTDIR/TKG/SHA.txt"
if [ -e ${output_file} ]; then
echo "rm $output_file"
rm ${output_file}
fi

checkRepoSHA "$TESTDIR" "ADOPTOPENJDK"
checkRepoSHA "$TESTDIR/TKG" "TKG"
}

checkOpenJ9RepoSHA()
{
echo "check OpenJ9 Repo sha"
Expand Down
1 change: 0 additions & 1 deletion openjdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@
</if>
</else>
</if>
<checkGitRepoSha repoDir="openjdk-jdk"/>
<addTestenvProperties repoDir="openjdk-jdk" repoName="JDK${env.JDK_VERSION}"/>
</target>

Expand Down
3 changes: 0 additions & 3 deletions system/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
</exec>
</then>
</if>
<checkGitRepoSha repoDir="${SYSTEMTEST_ROOT}/STF" />
<addTestenvProperties repoDir="${SYSTEMTEST_ROOT}/STF" repoName="STF"/>
</target>
<target name="clone_systemtest">
Expand Down Expand Up @@ -181,7 +180,6 @@
</exec>
</then>
</if>
<checkGitRepoSha repoDir="${SYSTEMTEST_ROOT}/aqa-systemtest" />
<addTestenvProperties repoDir="${SYSTEMTEST_ROOT}/aqa-systemtest" repoName="AQA_SYSTEMTEST" />
</target>

Expand Down Expand Up @@ -251,7 +249,6 @@
</exec>
</then>
</if>
<checkGitRepoSha repoDir="${SYSTEMTEST_ROOT}/openj9-systemtest" />
<addTestenvProperties repoDir="${SYSTEMTEST_ROOT}/openj9-systemtest" repoName="OPENJ9_SYSTEMTEST"/>
</target>

Expand Down
Loading