We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96a94ad commit ea91d8eCopy full SHA for ea91d8e
1 file changed
app/cdash/xml_handlers/BazelJSON_handler.php
@@ -545,7 +545,12 @@ public function ParseLine($line)
545
}
546
547
$test_name = $json_array['id']['testResult']['label'];
548
- $test_time = $json_array['testResult']['testAttemptDurationMillis'] / 1000.0;
+ $test_time = 0;
549
+ if (array_key_exists('testAttemptDurationMillis', $json_array['testResult'])) {
550
+ $test_time = $json_array['testResult']['testAttemptDurationMillis'] / 1000.0;
551
+ } elseif (array_key_exists('testAttemptDurationMillis', $json_array['id']['testResult'])) {
552
+ $test_time = $json_array['id']['testResult']['testAttemptDurationMillis'] / 1000.0;
553
+ }
554
555
if (array_key_exists('shard', $json_array['id']['testResult'])) {
556
// This test uses shards, so a Test with this name
0 commit comments