diff options
author | 2017-02-10 14:36:43 +0000 | |
---|---|---|
committer | 2017-02-10 15:37:00 +0000 | |
commit | 89512a7cbc4ff5d25415fc87b5d5d050452fa195 (patch) | |
tree | cbb48259566d852b85e39de1ee41061bd6d3fb5d /src/test | |
parent | 733f4c76cabe086b3ff544b915bae202dd183383 (diff) |
BEP: Provide more useful data in TestResult events
For individual test actions, more useful data can be provided
than just the success status. Do so.
Also, to keep each log reported only once, send a new
TestAttempt event for the final test attempt, but don't
have the TestResult (which contains to union of all test
files) an instance of the BuildEvent.
As we now report test results in a separate object, drop
the test data and directly pass in the files created. In
this way, we also get all the moved files reported correctly
in the individual attempts.
--
Change-Id: Ic04b7bad4f92a381bd4d1b4ec91f743b89f81f84
Reviewed-on: https://cr.bazel.build/8694
PiperOrigin-RevId: 147149025
MOS_MIGRATED_REVID=147149025
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/shell/integration/build_event_stream_test.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/test/shell/integration/build_event_stream_test.sh b/src/test/shell/integration/build_event_stream_test.sh index 8ed592cc81..84ff850623 100755 --- a/src/test/shell/integration/build_event_stream_test.sh +++ b/src/test/shell/integration/build_event_stream_test.sh @@ -107,14 +107,23 @@ function test_test_inidivual_results() { } function test_test_attempts() { + # Run a failing test declared as flaky. + # We expect to see 3 attempts to happen, and also find the 3 xml files + # mentioned in the stream. ( bazel test --experimental_build_event_text_file=$TEST_log pkg:flaky \ && fail "test failure expected" ) || true - expect_log 'attempt.*1' - expect_log 'attempt.*2' - expect_log 'attempt.*3' + expect_log 'attempt.*1$' + expect_log 'attempt.*2$' + expect_log 'attempt.*3$' expect_log_once '^test_summary ' expect_log_once '^progress ' expect_not_log 'aborted' + expect_log 'test_action_output' + expect_log 'flaky/.*attempt_1.xml' + expect_log 'flaky/.*attempt_2.xml' + expect_log 'flaky/.*test.xml' + expect_log 'name:.*test.log' + expect_log 'name:.*test.xml' } function test_test_attempts_multi_runs() { |