aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-10-16 14:22:21 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-10-16 17:49:03 +0200
commitd063524537b16fe5144ba92ea0b3fea39443d51a (patch)
treef032c1fe9c0d38d0099ed601439d8dde4ddd972d /src/test/shell
parentdeea6b08efef98ae2ef03d516356ab3438d089c8 (diff)
run_test: fix portability issue
There are different versions of sed, some implicitly add a newline character to the last line, some don't. To work around, add an additional newline character (so that the file for sure is newline-terminated) to all the files we're editing/comparing. Change-Id: I83e829f26dae839a965349fa137909249b581105 PiperOrigin-RevId: 172312277
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/integration/run_test.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/shell/integration/run_test.sh b/src/test/shell/integration/run_test.sh
index 405272c281..afa84f0d91 100755
--- a/src/test/shell/integration/run_test.sh
+++ b/src/test/shell/integration/run_test.sh
@@ -246,8 +246,11 @@ EOF
add_to_bazelrc common --show_progress_rate_limit=0.03
bazel run //x:x --color=yes >$out1color 2>$err1raw_color || fail "expected success"
bazel run //x:x --color=no >$out1nocolor 2>$err1raw_nocolor || fail "expected success"
+ echo >> $err1raw_color
+ echo >> $err1raw_nocolor
${PRODUCT_NAME}-bin/x/x >$out2 2>$err2
+ echo >> $err2
# Extract the binary's stderr from the raw stderr, which also contains bazel's
# stderr; if present, remove a trailing ^[[0m (reset terminal to defaults).