Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
  • Loading branch information
sophia-guo committed May 13, 2024
1 parent d10020f commit 97edbde
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
3 changes: 2 additions & 1 deletion test/system/reproducibleCompare/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
</test>
<test>
<testCaseName>Rebuild_Same_JDK_Reproducibility_Test_win</testCaseName>
<command>$(TEST_ROOT)$(D)system$(D)reproducibleCompare$(D)windows_repro_build_compare.sh $(SBOM_FILE) $(JDK_FILE); \
<command>ls $(TEST_ROOT)$(D)system$(D)reproducibleCompare$(D); \
$(TEST_ROOT)$(D)system$(D)reproducibleCompare$(D)windows_repro_build_compare.sh $(SBOM_FILE) $(JDK_FILE); \
$(TEST_STATUS)
</command>
<levels>
Expand Down
35 changes: 11 additions & 24 deletions tooling/reproducible/windows_repro_build_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,11 @@ Build_JDK() {

Compare_JDK() {
echo "Comparing JDKs"
echo ""
cd "$WORK_DIR"
mkdir "$WORK_DIR/compare"
cp "$WORK_DIR/src_jdk_dist.zip" "$WORK_DIR/compare"
cp "$WORK_DIR/reproJDK.zip" "$WORK_DIR/compare"
cd "$WORK_DIR/compare"

# Unzip And Rename The Source JDK
echo "Unzip Source"
unzip -q -o src_jdk_dist.zip
Expand All @@ -685,22 +688,7 @@ Compare_JDK() {

# These Two Files Are Generate Classes And Should Be Removed Prior To Running The Comparison
# jdk/bin/server/classes.jsa & jdk/bin/server/classes_nocoops.jsa

if [ -f "$WORK_DIR/src_jdk/bin/server/classes.jsa" ] ; then
rm -rf "$WORK_DIR/src_jdk/bin/server/classes.jsa"
fi

if [ -f "$WORK_DIR/tar_jdk/bin/server/classes.jsa" ] ; then
rm -rf "$WORK_DIR/tar_jdk/bin/server/classes.jsa"
fi

if [ -f "$WORK_DIR/src_jdk/bin/server/classes_nocoops.jsa" ] ; then
rm -rf "$WORK_DIR/src_jdk/bin/server/classes_nocoops.jsa"
fi

if [ -f "$WORK_DIR/tar_jdk/bin/server/classes_nocoops.jsa" ] ; then
rm -rf "$WORK_DIR/tar_jdk/bin/server/classes_nocoops.jsa"
fi
# should move to repro_common.sh

# Ensure Signtool Is In The Path
TOOLCOUNT=$(find "$SIGNTOOL_BASE" | grep $msvsArch | grep -ic "signtool.exe$")
Expand Down Expand Up @@ -735,24 +723,23 @@ Compare_JDK() {
export PATH="$PATH:$CPW"

# Run Comparison Script
echo "cd $WORK_DIR && $ScriptPath/repro_compare.sh temurin src_jdk temurin tar_jdk CYGWIN 2>&1" | sh &
echo "cd $ScriptPath && ./repro_compare.sh temurin $WORK_DIR/src_jdk temurin $WORK_DIR/tar_jdk CYGWIN 2>&1" | sh &
wait

# Display The Content Of reprotest.diff
echo ""
echo "---------------------------------------------"
echo "Output From JDK Comparison Script"
echo "---------------------------------------------"
cat "$WORK_DIR/reprotest.diff"
cat "$ScriptPath/reprotest.diff"
echo ""
echo "---------------------------------------------"
echo "Copying Output To $(dirname "$0")"

if [ -z "$REPORT_DIR" ]; then
REPORT_DIR="$ScriptPath"
if [ -n "$REPORT_DIR" ]; then
cp "$ScriptPath/reprotest.diff" "$REPORT_DIR"
cp "$WORK_DIR/reproJDK.zip" "$REPORT_DIR"
fi
cp "$WORK_DIR/reprotest.diff" "$REPORT_DIR"
cp "$WORK_DIR/reproJDK.zip" "$REPORT_DIR"
}

Clean_Up_Everything() {
Expand Down

0 comments on commit 97edbde

Please sign in to comment.