| Index: tools/testing/dart/test_suite.dart
|
| diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
|
| index 594c2d684d86f0271413516db8210d4014ff7b0c..72997182e62252ebfe934640607bfc6499e3161b 100644
|
| --- a/tools/testing/dart/test_suite.dart
|
| +++ b/tools/testing/dart/test_suite.dart
|
| @@ -79,6 +79,10 @@ class CCTestSuite implements TestSuite {
|
|
|
| var expectations = testExpectations.expectations(testName);
|
|
|
| + if (configuration["report"]) {
|
| + SummaryReport.add(expectations);
|
| + }
|
| +
|
| if (expectations.contains(SKIP)) return;
|
|
|
| // The cc test runner takes options after the name of the test
|
| @@ -207,7 +211,12 @@ class StandardTestSuite implements TestSuite {
|
| filename.substring(middle + 1, filename.length - 5);
|
| }
|
| Set<String> expectations = testExpectations.expectations(testName);
|
| -
|
| + if (configuration["report"]) {
|
| + // Tests with multiple VMOptions are counted more than once.
|
| + for (var dummy in optionsFromFile["vmOptions"]) {
|
| + SummaryReport.add(expectations);
|
| + }
|
| + }
|
| if (expectations.contains(SKIP)) return;
|
|
|
| isNegative = isNegative ||
|
| @@ -405,3 +414,56 @@ class TestUtils {
|
| return args;
|
| }
|
| }
|
| +
|
| +class SummaryReport {
|
| + static int total = 0;
|
| + static int skipped = 0;
|
| + static int noCrash = 0;
|
| + static int pass = 0;
|
| + static int failOk = 0;
|
| + static int fail = 0;
|
| + static int crash = 0;
|
| + static int timeout = 0;
|
| +
|
| + static void add(Set<String> expectations) {
|
| + ++total;
|
| + if (expectations.contains(SKIP)) {
|
| + ++skipped;
|
| + } else {
|
| + if (expectations.contains(PASS) && expectations.contains(FAIL) &&
|
| + !expectations.contains(CRASH) && !expectations.contains(OK)) {
|
| + ++noCrash;
|
| + }
|
| + if (expectations.contains(PASS) && expectations.length == 1) {
|
| + ++pass;
|
| + }
|
| + if (expectations.containsAll([FAIL, OK]) && expectations.length == 2) {
|
| + ++failOk;
|
| + }
|
| + if (expectations.contains(FAIL) && expectations.length == 1) {
|
| + ++fail;
|
| + }
|
| + if (expectations.contains(CRASH) && expectations.length == 1) {
|
| + ++crash;
|
| + }
|
| + if (expectations.contains(TIMEOUT)) {
|
| + ++timeout;
|
| + }
|
| + }
|
| + }
|
| +
|
| + static void printReport() {
|
| + if (total == 0) return;
|
| + String report = """\
|
| +Total: $total tests
|
| + * $skipped tests will be skipped
|
| + * $noCrash tests are expected to be flaky but not crash
|
| + * $pass tests are expected to pass
|
| + * $failOk tests are expected to fail that we won't fix
|
| + * $fail tests are expected to fail that we should fix
|
| + * $crash tests are expected to crash that we should fix
|
| + * $timeout tests are allowed to timeout\
|
| +""";
|
| + print(report);
|
| + }
|
| +}
|
|
|