From 2eee94c24462da2717bbd47cd0d7820645ed491b Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 22 Aug 2024 14:38:35 -0400 Subject: [PATCH] Testing Signed-off-by: Sophia Guo --- .../reproducible/linux_repro_build_compare.sh | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/tooling/reproducible/linux_repro_build_compare.sh b/tooling/reproducible/linux_repro_build_compare.sh index 76bd8900d..53a9c5d3b 100755 --- a/tooling/reproducible/linux_repro_build_compare.sh +++ b/tooling/reproducible/linux_repro_build_compare.sh @@ -24,9 +24,9 @@ ANT_VERSION=1.10.5 ANT_SHA=9028e2fc64491cca0f991acc09b06ee7fe644afe41d1d6caf72702ca25c4613c ANT_CONTRIB_VERSION=1.0b3 ANT_CONTRIB_SHA=4d93e07ae6479049bb28071b069b7107322adaee5b70016674a0bffd4aac47f9 -isJdkDir=false USING_DEVKIT="false" ScriptPath=$(dirname "$(realpath "$0")") + installPrereqs() { if test -r /etc/redhat-release; then # Replace mirrorlist to vault as centos7 reached EOL. @@ -180,42 +180,31 @@ if [ -z "$JDK_PARAM" ] && [ ! -d "jdk-${TEMURIN_VERSION}" ] ; then JDK_PARAM="https://api.adoptium.net/v3/binary/version/jdk-${TEMURIN_VERSION}/linux/${NATIVE_API_ARCH}/jdk/hotspot/normal/eclipse?project=jdk" fi +sourceJDK="jdk-${TEMURIN_VERSION}" +mkdir "${sourceJDK}" if [[ $JDK_PARAM =~ ^https?:// ]]; then echo Retrieving original tarball from adoptium.net && curl -L "$JDK_PARAM" | tar xpfz - && ls -lart "$PWD/jdk-${TEMURIN_VERSION}" || exit 1 elif [[ $JDK_PARAM =~ tar.gz ]]; then - mkdir "$PWD/jdk-${TEMURIN_VERSION}" tar xpfz "$JDK_PARAM" --strip-components=1 -C "$PWD/jdk-${TEMURIN_VERSION}" else - echo "Local jdk dir" - isJdkDir=true -fi - -comparedDir="jdk-${TEMURIN_VERSION}" -if [ "${isJdkDir}" = true ]; then - comparedDir=$JDK_PARAM + #Local jdk dir + cp -R ${JDK_PARAM}/* ${sourceJDK} fi echo "Rebuild args for makejdk_any_platform.sh are: $TEMURIN_BUILD_ARGS" -#Testing disable build -# echo " cd temurin-build && ./makejdk-any-platform.sh $TEMURIN_BUILD_ARGS 2>&1 | tee build.$$.log" | sh +echo " cd temurin-build && ./makejdk-any-platform.sh $TEMURIN_BUILD_ARGS 2>&1 | tee build.$$.log" | sh echo Comparing ... -mkdir compare -tar xpfz temurin-build/workspace/target/OpenJDK*-jdk_*tar.gz -C compare +mkdir tarJDK +tar xpfz temurin-build/workspace/target/OpenJDK*-jdk_*tar.gz -C tarJDK cp temurin-build/workspace/target/OpenJDK*-jdk_*tar.gz reproJDK.tar.gz cp "$SBOM" SBOM.json cp "$ScriptPath"/repro_*.sh "$PWD" -echo "under script path -files permission" -ls -l "$ScriptPath" -echo "files permission" -ls -l +chmod +x "$PWD"/repro_*.sh rc=0 set +e - -#Testing disable compare# -#echo "./repro_compare.sh temurin $comparedDir/ temurin compare/ Linux 2>&1" | sh & +echo "./repro_compare.sh temurin $sourceJDK temurin tarJDK Linux 2>&1" | sh & wait rc=$? set -e