Skip to content

Commit 5cc6246

Browse files
aehligkatre
authored andcommitted
build_event_stream_test: fix usage of ed(1)
Unfortunately the various ed(1)s are different in subtle ways. The difference that hit us here is the different treatment of the implicit 'e' command when ed is started with a file as argument; GNU ed writes the answer of that command (i.e., the number of bytes read) on stderr, whereas ed on FreeBSD writes it on stdout. So, let's merge the two output channels and throw away the first answer explicitly. Fixes #3842. Change-Id: I4ef394957cdc316f896b54ca218d4f118465caff PiperOrigin-RevId: 170506490
1 parent e1d2e39 commit 5cc6246

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/shell/integration/build_event_stream_test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,9 @@ function test_alias() {
664664
# there would be no event for alias:it. So we can check the correct reporting
665665
# by checking for aborted events.
666666
expect_not_log 'aborted'
667-
(echo 'g/^completed/?label?p'; echo 'q') | ed "${TEST_log}" > completed_labels
667+
668+
(echo 'g/^completed/?label?p'; echo 'q') | ed "${TEST_log}" 2>&1 | tail -n +2 > completed_labels
669+
cat completed_labels
668670
grep -q '//alias:it' completed_labels || fail "//alias:it not completed"
669671
grep -q '//alias/actual:it' completed_labels \
670672
|| fail "//alias/actual:it not completed"

0 commit comments

Comments
 (0)