diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2015-09-15 10:10:23 +0000 |
---|---|---|
committer | John Field <jfield@google.com> | 2015-09-15 20:26:51 +0000 |
commit | 30df7fc06f35fb691e0bb67085e25be1a8d21b04 (patch) | |
tree | 55c0e886b834c9daf4ca6116f6c06472b1a6b59b /third_party | |
parent | c653738d6174a282e64b4fbbee00b1acb6224bf9 (diff) |
Fixes ijar tests on OSX
Two things were broken:
- Paths to zip/unzip when in the PATH by latest change
- md5sum was broken by FreeBSD change
--
MOS_MIGRATED_REVID=103077733
Diffstat (limited to 'third_party')
-rwxr-xr-x | third_party/ijar/test/ijar_test.sh | 14 | ||||
-rwxr-xr-x | third_party/ijar/test/testenv.sh | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/third_party/ijar/test/ijar_test.sh b/third_party/ijar/test/ijar_test.sh index 9778469fed..848dbddd53 100755 --- a/third_party/ijar/test/ijar_test.sh +++ b/third_party/ijar/test/ijar_test.sh @@ -41,13 +41,13 @@ source ${DIR}/testenv.sh || { echo "testenv.sh not found!" >&2; exit 1; } ## Tools -# Ensure that javac is absolute -[[ "$JAVAC" =~ ^/ ]] || JAVAC="$PWD/$JAVAC" -[[ "$JAR" =~ ^/ ]] || JAR="$PWD/$JAR" -[[ "$IJAR" =~ ^/ ]] || IJAR="$PWD/$IJAR" -[[ "$UNZIP" =~ ^/ ]] || UNZIP="$PWD/$UNZIP" -[[ "$ZIP" =~ ^/ ]] || ZIP="$PWD/$ZIP" -[[ "$JAVAP" =~ ^/ ]] || JAVAP="$PWD/$JAVAP" +# Ensure that tooling path is absolute if not in PATH. +[[ "$JAVAC" =~ ^(/|[^/]+$) ]] || JAVAC="$PWD/$JAVAC" +[[ "$JAR" =~ ^(/|[^/]+$) ]] || JAR="$PWD/$JAR" +[[ "$IJAR" =~ ^(/|[^/]+$) ]] || IJAR="$PWD/$IJAR" +[[ "$UNZIP" =~ ^(/|[^/]+$) ]] || UNZIP="$PWD/$UNZIP" +[[ "$ZIP" =~ ^(/|[^/]+$) ]] || ZIP="$PWD/$ZIP" +[[ "$JAVAP" =~ ^(/|[^/]+$) ]] || JAVAP="$PWD/$JAVAP" IJAR_SRCDIR=$(dirname ${IJAR}) A_JAR=$TEST_TMPDIR/A.jar diff --git a/third_party/ijar/test/testenv.sh b/third_party/ijar/test/testenv.sh index 0cb2c21da8..0e704ad1df 100755 --- a/third_party/ijar/test/testenv.sh +++ b/third_party/ijar/test/testenv.sh @@ -29,10 +29,10 @@ if [[ "$PLATFORM" = "linux" ]]; then function statfmt() { stat -c "%s" $1 } - MD5SUM=/sbin/md5 + MD5SUM=md5sum else function statfmt() { stat -f "%z" $1 } - MD5SUM=md5sum + MD5SUM=/sbin/md5 fi |