commit | 5b652301ff495965ec5a9120d65bb39ec4a7f42a | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@engflow.com> | Tue May 02 08:01:50 2023 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue May 02 08:03:29 2023 -0700 |
tree | d99a6ddd643835b1e9a0bf35742d1a2a53e01c20 | |
parent | 36374709a9a076fdd84f86dd57e4ae43471adf17 [diff] |
Reapply ijar race fix Cloned from https://github.com/bazelbuild/bazel/pull/18146 that got reverted by https://github.com/bazelbuild/bazel/commit/ecf1db0020ac139d10c5067cd0cbd1c2b53c67b6 PiperOrigin-RevId: 528784345 Change-Id: I06063c517a4e91b3ec49632483876a5baf5b20fe
diff --git a/third_party/ijar/test/ijar_test.sh b/third_party/ijar/test/ijar_test.sh index 905d038..2c436cf 100755 --- a/third_party/ijar/test/ijar_test.sh +++ b/third_party/ijar/test/ijar_test.sh
@@ -106,8 +106,8 @@ local actual="$(cat $1 | ${MD5SUM} | awk '{ print $1; }')" local filename="$(echo $1 | ${MD5SUM} | awk '{ print $1; }')" local expected="$actual" - if (echo "${expected_output}" | grep -q "^${filename} "); then - echo "${expected_output}" | grep -q "^${filename} ${actual}$" || { + if (grep -q "^${filename} " <<<"${expected_output}"); then + grep -q "^${filename} ${actual}$" <<<"${expected_output}" || { ls -l "$1" fail "output file contents differ" }