| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Classes and methods for enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 dartFlags.add("--enable_type_checks"); | 939 dartFlags.add("--enable_type_checks"); |
| 940 } | 940 } |
| 941 dartFlags.addAll(vmOptions); | 941 dartFlags.addAll(vmOptions); |
| 942 args.add('--dart-flags=${Strings.join(dartFlags, " ")}'); | 942 args.add('--dart-flags=${Strings.join(dartFlags, " ")}'); |
| 943 } | 943 } |
| 944 args.add(fullHtmlPath); | 944 args.add(fullHtmlPath); |
| 945 if (expectedOutput != null) { | 945 if (expectedOutput != null) { |
| 946 args.add('--out-expectation=${expectedOutput.toNativePath()}'); | 946 args.add('--out-expectation=${expectedOutput.toNativePath()}'); |
| 947 } | 947 } |
| 948 } | 948 } |
| 949 List<String> commandSet = new List<String>.from(commands); | 949 List<Command> commandSet = new List<Command>.from(commands); |
| 950 if (subtestIndex != 0) { | 950 if (subtestIndex != 0) { |
| 951 commandSet = []; | 951 commandSet = []; |
| 952 if(TestUtils.usesWebDriver(runtime)) args.add('--force-refresh'); | 952 if(TestUtils.usesWebDriver(runtime)) args.add('--force-refresh'); |
| 953 } | 953 } |
| 954 commandSet.add(new Command('python', args)); | 954 commandSet.add(new Command('python', args)); |
| 955 | 955 |
| 956 // Create BrowserTestCase and queue it. | 956 // Create BrowserTestCase and queue it. |
| 957 String testDisplayName = '$suiteName/$testName'; | 957 String testDisplayName = '$suiteName/$testName'; |
| 958 var testCase; | 958 var testCase; |
| 959 if (info.optionsFromFile['isMultiHtmlTest']) { | 959 if (info.optionsFromFile['isMultiHtmlTest']) { |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 new File.fromPath(source).openInputStream().pipe(output); | 1498 new File.fromPath(source).openInputStream().pipe(output); |
| 1499 var completer = new Completer(); | 1499 var completer = new Completer(); |
| 1500 output.onClosed = (){ completer.complete(null); }; | 1500 output.onClosed = (){ completer.complete(null); }; |
| 1501 return completer.future; | 1501 return completer.future; |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 static String flakyFileName() { | 1504 static String flakyFileName() { |
| 1505 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) | 1505 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) |
| 1506 // will be written to this file. This is useful for the debugging of | 1506 // will be written to this file. This is useful for the debugging of |
| 1507 // flaky tests. | 1507 // flaky tests. |
| 1508 // When running on a built bot, the file can be made visible in the waterfal
l UI. | 1508 // When running on a built bot, the file can be made visible in the |
| 1509 // waterfall UI. |
| 1509 return ".flaky.log"; | 1510 return ".flaky.log"; |
| 1510 } | 1511 } |
| 1511 | 1512 |
| 1512 static void ensureExists(String filename, Map configuration) { | 1513 static void ensureExists(String filename, Map configuration) { |
| 1513 if (!configuration['list'] && !(new File(filename).existsSync())) { | 1514 if (!configuration['list'] && !(new File(filename).existsSync())) { |
| 1514 throw "Executable '$filename' does not exist"; | 1515 throw "Executable '$filename' does not exist"; |
| 1515 } | 1516 } |
| 1516 } | 1517 } |
| 1517 | 1518 |
| 1518 static String outputDir(Map configuration) { | 1519 static String outputDir(Map configuration) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 * $pass tests are expected to pass | 1632 * $pass tests are expected to pass |
| 1632 * $failOk tests are expected to fail that we won't fix | 1633 * $failOk tests are expected to fail that we won't fix |
| 1633 * $fail tests are expected to fail that we should fix | 1634 * $fail tests are expected to fail that we should fix |
| 1634 * $crash tests are expected to crash that we should fix | 1635 * $crash tests are expected to crash that we should fix |
| 1635 * $timeout tests are allowed to timeout | 1636 * $timeout tests are allowed to timeout |
| 1636 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1637 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1637 """; | 1638 """; |
| 1638 print(report); | 1639 print(report); |
| 1639 } | 1640 } |
| 1640 } | 1641 } |
| OLD | NEW |