aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration/execution_phase_tests.sh
diff options
context:
space:
mode:
authorGravatar schmitt <schmitt@google.com>2017-04-12 17:25:09 +0000
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-04-13 09:36:48 +0200
commit2d5d17b221574583f3503fe536c7240c168311da (patch)
tree8af68712b9aa8e0e3b7450106b0f5cb9ca351c60 /src/test/shell/integration/execution_phase_tests.sh
parent7d0bcf93e518065f0458aa215db9487e25e1be4a (diff)
Add a custom single-line formatter for java.log.
This logger makes it easier to parse log statements and is now enabled for Bazel's java.log. RELNOTES[INC]: Bazel now prints logs in single lines to java.log PiperOrigin-RevId: 152954337
Diffstat (limited to 'src/test/shell/integration/execution_phase_tests.sh')
-rwxr-xr-xsrc/test/shell/integration/execution_phase_tests.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/shell/integration/execution_phase_tests.sh b/src/test/shell/integration/execution_phase_tests.sh
index 3d4f0dd445..b202fe6029 100755
--- a/src/test/shell/integration/execution_phase_tests.sh
+++ b/src/test/shell/integration/execution_phase_tests.sh
@@ -47,7 +47,7 @@ function assert_last_log() {
local log="${1}"; shift
local fail_message="${1}"; shift
- if ! grep -A1 "${context}" "${log}" | tail -n1 | grep -q "${message}" ; then
+ if ! grep "${context}" "${log}" | grep -q "${message}" ; then
cat "${log}" >>"${TEST_log}" # Help debugging when we fail.
fail "${fail_message}"
fi
@@ -60,7 +60,7 @@ function assert_cache_stats() {
local exp_value="${1}"; shift
local java_log="$(bazel info output_base 2>/dev/null)/java.log"
- local last="$(grep -A1 "CacheFileDigestsModule" "${java_log}" | tail -n1)"
+ local last="$(grep "CacheFileDigestsModule" "${java_log}")"
[ -n "${last}" ] || fail "Could not find cache stats in log"
if ! echo "${last}" | grep -q "${metric}=${exp_value}"; then
echo "Last cache stats: ${last}" >>"${TEST_log}"