aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/bazel_test_test.sh
diff options
context:
space:
mode:
authorGravatar Benjamin Peterson <bp@benjamin.pe>2017-06-27 11:37:07 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-27 15:06:01 +0200
commit4bb4b3d7553f74d68b38743dd6500ece1b1be2e7 (patch)
treea418c5d33c88c38e95e5675ea66fdb346e3b2f6a /src/test/shell/bazel/bazel_test_test.sh
parent69e74cd463c29ce7f3cbc36f392633b2617b3f80 (diff)
give the duration of test in the fallback xml file
A common extension to junitxml is to provide the duration of each test case in seconds. Here, we add the duration to the xml file that test-setup.sh provides if the test driver doesn't generate one. Change-Id: I25f94f10bb99db7078919f3e0bcdf7bd3cbb637d PiperOrigin-RevId: 160252993
Diffstat (limited to 'src/test/shell/bazel/bazel_test_test.sh')
-rwxr-xr-xsrc/test/shell/bazel/bazel_test_test.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_test_test.sh b/src/test/shell/bazel/bazel_test_test.sh
index a175139783..9f0c4614ef 100755
--- a/src/test/shell/bazel/bazel_test_test.sh
+++ b/src/test/shell/bazel/bazel_test_test.sh
@@ -357,10 +357,12 @@ EOF
cat bazel-testlogs/dir/success/test.xml >$TEST_log
expect_log "errors=\"0\""
expect_log_once "testcase"
+ expect_log_once "duration=\"[0-9]\+\""
expect_log "name=\"dir/success\""
cat bazel-testlogs/dir/fail/test.xml >$TEST_log
expect_log "errors=\"1\""
expect_log_once "testcase"
+ expect_log_once "duration=\"[0-9]\+\""
expect_log "name=\"dir/fail\""
}