From c402bf749616655dc2d6d4ddcb51c1b7953a8ff6 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 12 Dec 2024 09:23:36 -0500 Subject: [PATCH 1/4] Move SHA check function to TKG --- functional/OpenJcePlusTests/build.xml | 1 - functional/security/Crypto/build.xml | 1 - get.sh | 4 ---- openjdk/build.xml | 1 - system/common.xml | 3 --- 5 files changed, 10 deletions(-) diff --git a/functional/OpenJcePlusTests/build.xml b/functional/OpenJcePlusTests/build.xml index f884ea0789..f09f1c30ec 100644 --- a/functional/OpenJcePlusTests/build.xml +++ b/functional/OpenJcePlusTests/build.xml @@ -95,7 +95,6 @@ - diff --git a/functional/security/Crypto/build.xml b/functional/security/Crypto/build.xml index 603c8306a3..2066875be6 100644 --- a/functional/security/Crypto/build.xml +++ b/functional/security/Crypto/build.xml @@ -43,7 +43,6 @@ - diff --git a/get.sh b/get.sh index 90b95f251b..0302319d80 100755 --- a/get.sh +++ b/get.sh @@ -808,12 +808,8 @@ 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 } diff --git a/openjdk/build.xml b/openjdk/build.xml index 66703c0e97..4f83a4f101 100755 --- a/openjdk/build.xml +++ b/openjdk/build.xml @@ -232,7 +232,6 @@ - diff --git a/system/common.xml b/system/common.xml index 2dc220e63c..54f406ac83 100644 --- a/system/common.xml +++ b/system/common.xml @@ -112,7 +112,6 @@ - @@ -181,7 +180,6 @@ - @@ -251,7 +249,6 @@ - From 2a8a65313092dba04527908776d60637cad3957a Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Mon, 16 Dec 2024 11:32:15 -0500 Subject: [PATCH 2/4] No not remove the .git repo dir --- get.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/get.sh b/get.sh index 0302319d80..81d299c7ff 100755 --- a/get.sh +++ b/get.sh @@ -660,8 +660,6 @@ getFunctionalTestMaterial() else mv openj9/test/functional functional fi - - rm -rf openj9 } getVendorTestMaterial() { @@ -744,9 +742,6 @@ getVendorTestMaterial() { # already in TESTDIR, thus copy the entire vendor repo content to current directory cp -r $dest/* ./ fi - - # clean up - rm -rf $dest done } From 280ca14656746780727b82c86a5c3ae5255a9fcc Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Tue, 17 Dec 2024 16:55:10 -0500 Subject: [PATCH 3/4] Collecting Openj9 and Vendors repo SHA at stage time --- get.sh | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/get.sh b/get.sh index 81d299c7ff..a14927882a 100755 --- a/get.sh +++ b/get.sh @@ -570,7 +570,6 @@ getTestKitGen() echo "git checkout -q -f $tkg_sha" git checkout -q -f $tkg_sha - checkTestRepoSHAs } getCustomJtreg() @@ -660,6 +659,8 @@ getFunctionalTestMaterial() else mv openj9/test/functional functional fi + + rm -rf openj9 } getVendorTestMaterial() { @@ -742,6 +743,9 @@ getVendorTestMaterial() { # already in TESTDIR, thus copy the entire vendor repo content to current directory cp -r $dest/* ./ fi + + # clean up + rm -rf $dest done } @@ -803,26 +807,15 @@ testJavaVersion() checkRepoSHA() { - testenv_file="$TESTDIR/testenv/testenv.properties" + sha_file="$TESTDIR/TKG/SHAs.txt" + echo "$TESTDIR/TKG/scripts/getSHAs.sh --repo_dir $1 --output_file $sha_file" + $TESTDIR/TKG/scripts/getSHAs.sh --test_root_dir $1 --shas_file $sha_file + testenv_file="$TESTDIR/testenv/testenv.properties" 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" From 9564e08295517fc1405a86305dc87769117b48d6 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Fri, 20 Dec 2024 18:36:55 -0500 Subject: [PATCH 4/4] keep .git folder --- get.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/get.sh b/get.sh index a14927882a..648854ea0d 100755 --- a/get.sh +++ b/get.sh @@ -659,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 + cd $TESTDIR } getVendorTestMaterial() { @@ -745,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 } @@ -807,11 +817,8 @@ testJavaVersion() checkRepoSHA() { - sha_file="$TESTDIR/TKG/SHAs.txt" - echo "$TESTDIR/TKG/scripts/getSHAs.sh --repo_dir $1 --output_file $sha_file" - $TESTDIR/TKG/scripts/getSHAs.sh --test_root_dir $1 --shas_file $sha_file - testenv_file="$TESTDIR/testenv/testenv.properties" + 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 }