Skip to content

Commit

Permalink
8294310: compare.sh fails on macos after JDK-8293550
Browse files Browse the repository at this point in the history
Reviewed-by: ihse
  • Loading branch information
erikj79 committed Oct 5, 2022
1 parent 13a5000 commit b9eeec2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions make/autoconf/compare.sh.in
Expand Up @@ -40,6 +40,7 @@ export AWK="@AWK@"
export BASH="@BASH@"
export CAT="@CAT@"
export CMP="@CMP@"
export CODESIGN="@CODESIGN@"
export CP="@CP@"
export CUT="@CUT@"
export DIFF="@DIFF@"
Expand Down
2 changes: 1 addition & 1 deletion make/conf/jib-profiles.js
Expand Up @@ -553,7 +553,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"ANT_HOME": input.get("ant", "home_path")
}
};
[ "linux-x64", "macosx-x64", "windows-x64", "linux-aarch64"]
[ "linux-x64", "macosx-aarch64", "macosx-x64", "windows-x64", "linux-aarch64"]
.forEach(function (name) {
var maketestName = name + "-testmake";
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
Expand Down
15 changes: 12 additions & 3 deletions make/scripts/compare.sh
Expand Up @@ -42,6 +42,7 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
LDD_CMD="$OTOOL -L"
DIS_CMD="$OTOOL -v -V -t"
STAT_PRINT_SIZE="-f %z"
STRIP="$STRIP -no_code_signature_warning"
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
FULLDUMP_CMD="$DUMPBIN -all"
LDD_CMD="$DUMPBIN -dependents"
Expand Down Expand Up @@ -674,14 +675,22 @@ compare_bin_file() {
ORIG_THIS_FILE="$THIS_FILE"
ORIG_OTHER_FILE="$OTHER_FILE"

if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]] \
|| [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
$MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
$CP $THIS_FILE $THIS_STRIPPED_FILE
$CP $OTHER_FILE $OTHER_STRIPPED_FILE
$STRIP $THIS_STRIPPED_FILE
$STRIP $OTHER_STRIPPED_FILE
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
$STRIP $THIS_STRIPPED_FILE
$STRIP $OTHER_STRIPPED_FILE
fi
# On macosx, always remove any signature before comparing
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
$CODESIGN --remove-signature $THIS_STRIPPED_FILE
$CODESIGN --remove-signature $OTHER_STRIPPED_FILE
fi
THIS_FILE="$THIS_STRIPPED_FILE"
OTHER_FILE="$OTHER_STRIPPED_FILE"
fi
Expand Down

1 comment on commit b9eeec2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.