diff options
author | janakr <janakr@google.com> | 2017-10-12 03:25:21 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-10-12 10:17:01 +0200 |
commit | 59984b5bb795f6067117be47c44ddb21ccc376de (patch) | |
tree | c8ad09ba9d1618d50da6a84837f92d0882409b36 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | 39a7421816c8e92fa44d1368dae518d8cda7ac97 (diff) |
Add some debugging in TestResultAnalyzer: make crash message more informative if the number of summaries and the number of test targets don't agree. My guess is somehow we have duplicate configured targets?
PiperOrigin-RevId: 171904831
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java b/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java index b960716838..1daec5e5cc 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java @@ -112,7 +112,15 @@ public class TestResultAnalyzer { } } - Preconditions.checkState(summaries.size() == testTargets.size()); + int summarySize = summaries.size(); + int testTargetsSize = testTargets.size(); + Preconditions.checkState( + summarySize == testTargetsSize, + "Unequal sizes: %s vs %s (%s and %s)", + summarySize, + testTargetsSize, + summaries, + testTargets); notifier.notify(summaries, totalRun); // skipped targets are not in passCount since they have NO_STATUS |