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, |
11 * and creating [TestCase]s for those files that meet the relevant criteria. | 11 * and creating [TestCase]s for those files that meet the relevant criteria. |
12 * - Preparing tests, including copying files and frameworks to temporary | 12 * - Preparing tests, including copying files and frameworks to temporary |
13 * directories, and computing the command line and arguments to be run. | 13 * directories, and computing the command line and arguments to be run. |
14 */ | 14 */ |
15 library test_suite; | 15 library test_suite; |
16 | 16 |
17 import "dart:async"; | 17 import "dart:async"; |
18 import "dart:io"; | 18 import "dart:io"; |
19 import "dart:isolate"; | 19 import "dart:isolate"; |
20 import "status_file_parser.dart"; | 20 import "status_file_parser.dart"; |
21 import "test_runner.dart"; | 21 import "test_runner.dart"; |
22 import "multitest.dart"; | 22 import "multitest.dart"; |
23 import "drt_updater.dart"; | 23 import "drt_updater.dart"; |
24 import "dart:uri"; | 24 import "dart:uri"; |
| 25 import '../../../pkg/path/lib/path.dart' as pathLib; |
25 | 26 |
26 part "browser_test.dart"; | 27 part "browser_test.dart"; |
27 | 28 |
28 | 29 |
29 // TODO(rnystrom): Add to dart:core? | 30 // TODO(rnystrom): Add to dart:core? |
30 /** | 31 /** |
31 * A simple function that tests [arg] and returns `true` or `false`. | 32 * A simple function that tests [arg] and returns `true` or `false`. |
32 */ | 33 */ |
33 typedef bool Predicate<T>(T arg); | 34 typedef bool Predicate<T>(T arg); |
34 | 35 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 */ | 402 */ |
402 class StandardTestSuite extends TestSuite { | 403 class StandardTestSuite extends TestSuite { |
403 final Path suiteDir; | 404 final Path suiteDir; |
404 final List<String> statusFilePaths; | 405 final List<String> statusFilePaths; |
405 TestCaseEvent doTest; | 406 TestCaseEvent doTest; |
406 TestExpectations testExpectations; | 407 TestExpectations testExpectations; |
407 List<TestInformation> cachedTests; | 408 List<TestInformation> cachedTests; |
408 final Path dartDir; | 409 final Path dartDir; |
409 Predicate<String> isTestFilePredicate; | 410 Predicate<String> isTestFilePredicate; |
410 final bool listRecursively; | 411 final bool listRecursively; |
| 412 /** |
| 413 * The set of servers that have been started to run these tests (Could be |
| 414 * none). |
| 415 */ |
| 416 List serverList; |
411 | 417 |
412 StandardTestSuite(Map configuration, | 418 StandardTestSuite(Map configuration, |
413 String suiteName, | 419 String suiteName, |
414 Path suiteDirectory, | 420 Path suiteDirectory, |
415 this.statusFilePaths, | 421 this.statusFilePaths, |
416 {this.isTestFilePredicate, | 422 {this.isTestFilePredicate, |
417 bool recursive: false}) | 423 bool recursive: false, |
| 424 this.serverList: const []}) |
418 : super(configuration, suiteName), | 425 : super(configuration, suiteName), |
419 dartDir = TestUtils.dartDir(), | 426 dartDir = TestUtils.dartDir(), |
420 listRecursively = recursive, | 427 listRecursively = recursive, |
421 suiteDir = TestUtils.dartDir().join(suiteDirectory); | 428 suiteDir = TestUtils.dartDir().join(suiteDirectory); |
422 | 429 |
423 /** | 430 /** |
424 * Creates a test suite whose file organization matches an expected structure. | 431 * Creates a test suite whose file organization matches an expected structure. |
425 * To use this, your suite should look like: | 432 * To use this, your suite should look like: |
426 * | 433 * |
427 * dart/ | 434 * dart/ |
(...skipping 11 matching lines...) Expand all Loading... |
439 * * The status file uses the same name. | 446 * * The status file uses the same name. |
440 * * Test files are directly in that directory and end in "_test.dart". | 447 * * Test files are directly in that directory and end in "_test.dart". |
441 * | 448 * |
442 * If you follow that convention, then you can construct one of these like: | 449 * If you follow that convention, then you can construct one of these like: |
443 * | 450 * |
444 * new StandardTestSuite.forDirectory(configuration, 'path/to/mytestsuite'); | 451 * new StandardTestSuite.forDirectory(configuration, 'path/to/mytestsuite'); |
445 * | 452 * |
446 * instead of having to create a custom [StandardTestSuite] subclass. In | 453 * instead of having to create a custom [StandardTestSuite] subclass. In |
447 * particular, if you add 'path/to/mytestsuite' to [TEST_SUITE_DIRECTORIES] | 454 * particular, if you add 'path/to/mytestsuite' to [TEST_SUITE_DIRECTORIES] |
448 * in test.dart, this will all be set up for you. | 455 * in test.dart, this will all be set up for you. |
| 456 * |
| 457 * The [StandardTestSuite] also optionally takes a list of servers that have |
| 458 * been started up by the test harness, to be used by browser tests. |
449 */ | 459 */ |
450 factory StandardTestSuite.forDirectory( | 460 factory StandardTestSuite.forDirectory( |
451 Map configuration, Path directory) { | 461 Map configuration, Path directory, {List serverList : const []}) { |
452 final name = directory.filename; | 462 final name = directory.filename; |
453 | 463 |
454 return new StandardTestSuite(configuration, | 464 return new StandardTestSuite(configuration, |
455 name, directory, | 465 name, directory, |
456 ['$directory/$name.status', '$directory/${name}_dart2js.status'], | 466 ['$directory/$name.status', '$directory/${name}_dart2js.status'], |
457 isTestFilePredicate: (filename) => filename.endsWith('_test.dart'), | 467 isTestFilePredicate: (filename) => filename.endsWith('_test.dart'), |
458 recursive: true); | 468 recursive: true, serverList: serverList); |
459 } | 469 } |
460 | 470 |
461 Collection<Uri> get dart2JsBootstrapDependencies { | 471 Collection<Uri> get dart2JsBootstrapDependencies { |
462 if (!useSdk) return []; | 472 if (!useSdk) return []; |
463 | 473 |
464 var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join( | 474 var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join( |
465 new Path('dart-sdk/lib/_internal/compiler/' | 475 new Path('dart-sdk/lib/_internal/compiler/' |
466 'implementation/dart2js.dart.snapshot'))).toString(); | 476 'implementation/dart2js.dart.snapshot'))).toString(); |
467 return [new Uri.fromComponents(scheme: 'file', path: snapshotPath)]; | 477 return [new Uri.fromComponents(scheme: 'file', path: snapshotPath)]; |
468 } | 478 } |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 dartLibraryFilename = new Path('test_as_library.dart'); | 863 dartLibraryFilename = new Path('test_as_library.dart'); |
854 File file = new File('$tempDir/$dartLibraryFilename'); | 864 File file = new File('$tempDir/$dartLibraryFilename'); |
855 RandomAccessFile dartLibrary = file.openSync(FileMode.WRITE); | 865 RandomAccessFile dartLibrary = file.openSync(FileMode.WRITE); |
856 dartLibrary.writeStringSync(wrapDartTestInLibrary(filePath)); | 866 dartLibrary.writeStringSync(wrapDartTestInLibrary(filePath)); |
857 dartLibrary.closeSync(); | 867 dartLibrary.closeSync(); |
858 } | 868 } |
859 | 869 |
860 File file = new File(dartWrapperFilename); | 870 File file = new File(dartWrapperFilename); |
861 RandomAccessFile dartWrapper = file.openSync(FileMode.WRITE); | 871 RandomAccessFile dartWrapper = file.openSync(FileMode.WRITE); |
862 dartWrapper.writeStringSync( | 872 dartWrapper.writeStringSync( |
863 dartTestWrapper(dartDir, dartLibraryFilename)); | 873 dartTestWrapper(dartDir, file.name, dartLibraryFilename)); |
864 dartWrapper.closeSync(); | 874 dartWrapper.closeSync(); |
865 } else { | 875 } else { |
866 dartWrapperFilename = filename; | 876 dartWrapperFilename = filename; |
867 // TODO(whesse): Once test.py is retired, adjust the relative path in | 877 // TODO(whesse): Once test.py is retired, adjust the relative path in |
868 // the client/samples/dartcombat test to its css file, remove the | 878 // the client/samples/dartcombat test to its css file, remove the |
869 // "../../" from this path, and move this out of the isWebTest guard. | 879 // "../../" from this path, and move this out of the isWebTest guard. |
870 // Also remove getHtmlName, and just use test.html. | 880 // Also remove getHtmlName, and just use test.html. |
871 // TODO(efortuna): this shortening of htmlFilename is a band-aid until | 881 // TODO(efortuna): this shortening of htmlFilename is a band-aid until |
872 // the above TODO gets fixed. Windows cannot have paths that are longer | 882 // the above TODO gets fixed. Windows cannot have paths that are longer |
873 // than 260 characters, and without this hack, we were running past the | 883 // than 260 characters, and without this hack, we were running past the |
874 // the limit. | 884 // the limit. |
875 String htmlFilename = getHtmlName(filename); | 885 String htmlFilename = getHtmlName(filename); |
876 while ('$tempDir/../$htmlFilename'.length >= 260) { | 886 while ('$tempDir/../$htmlFilename'.length >= 260) { |
877 htmlFilename = htmlFilename.substring(htmlFilename.length~/2); | 887 htmlFilename = htmlFilename.substring(htmlFilename.length~/2); |
878 } | 888 } |
879 htmlPath = '$tempDir/../$htmlFilename'; | 889 htmlPath = '$tempDir/../$htmlFilename'; |
880 } | 890 } |
881 final String scriptPath = (compiler == 'none') ? | 891 final String scriptPath = (compiler == 'none') ? |
882 dartWrapperFilename : compiledDartWrapperFilename; | 892 dartWrapperFilename : compiledDartWrapperFilename; |
883 // Create the HTML file for the test. | 893 // Create the HTML file for the test. |
884 RandomAccessFile htmlTest = new File(htmlPath).openSync(FileMode.WRITE); | 894 RandomAccessFile htmlTest = new File(htmlPath).openSync(FileMode.WRITE); |
885 String filePrefix = ''; | |
886 if (Platform.operatingSystem == 'windows') { | |
887 // Firefox on Windows does not like absolute file path names that start | |
888 // with 'C:' adding 'file:///' solves the problem. | |
889 filePrefix = 'file:///'; | |
890 } | |
891 String content = null; | 895 String content = null; |
892 Path dir = filePath.directoryPath; | 896 Path dir = filePath.directoryPath; |
893 String nameNoExt = filePath.filenameWithoutExtension; | 897 String nameNoExt = filePath.filenameWithoutExtension; |
894 Path pngPath = dir.append('$nameNoExt.png'); | 898 Path pngPath = dir.append('$nameNoExt.png'); |
895 Path txtPath = dir.append('$nameNoExt.txt'); | 899 Path txtPath = dir.append('$nameNoExt.txt'); |
896 Path expectedOutput = null; | 900 Path expectedOutput = null; |
897 if (new File.fromPath(pngPath).existsSync()) { | 901 if (new File.fromPath(pngPath).existsSync()) { |
898 expectedOutput = pngPath; | 902 expectedOutput = pngPath; |
899 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); | 903 content = getHtmlLayoutContents(scriptType, pathLib.relative(scriptPath, |
| 904 from: pathLib.dirname(htmlPath))); |
900 } else if (new File.fromPath(txtPath).existsSync()) { | 905 } else if (new File.fromPath(txtPath).existsSync()) { |
901 expectedOutput = txtPath; | 906 expectedOutput = txtPath; |
902 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); | 907 content = getHtmlLayoutContents(scriptType, pathLib.relative(scriptPath, |
| 908 from: pathLib.dirname(htmlPath))); |
903 } else { | 909 } else { |
904 final htmlLocation = new Path.fromNative(htmlPath); | 910 final htmlLocation = new Path.fromNative(htmlPath); |
905 content = getHtmlContents( | 911 content = getHtmlContents( |
906 filename, | 912 filename, |
907 dartDir.append('pkg/unittest/test_controller.js') | 913 dartDir.append('pkg/unittest/test_controller.js') |
908 .relativeTo(htmlLocation), | 914 .relativeTo(htmlLocation), |
909 dartDir.append('pkg/browser/lib/dart.js').relativeTo(htmlLocation), | 915 dartDir.append('pkg/browser/lib/dart.js').relativeTo(htmlLocation), |
910 scriptType, | 916 scriptType, |
911 new Path.fromNative(scriptPath).relativeTo(htmlLocation)); | 917 new Path.fromNative(scriptPath).relativeTo(htmlLocation)); |
912 } | 918 } |
(...skipping 29 matching lines...) Expand all Loading... |
942 do { | 948 do { |
943 List<Command> commandSet = new List<Command>.from(commands); | 949 List<Command> commandSet = new List<Command>.from(commands); |
944 if (subtestIndex != 0) { | 950 if (subtestIndex != 0) { |
945 // NOTE: The first time we enter this loop, all the compilation | 951 // NOTE: The first time we enter this loop, all the compilation |
946 // commands will be executed. On subsequent loop iterations, we | 952 // commands will be executed. On subsequent loop iterations, we |
947 // don't need to do any compilations. Thus we set "commandSet = []". | 953 // don't need to do any compilations. Thus we set "commandSet = []". |
948 commandSet = []; | 954 commandSet = []; |
949 } | 955 } |
950 | 956 |
951 List<String> args = <String>[]; | 957 List<String> args = <String>[]; |
952 String fullHtmlPath = htmlPath.startsWith('http:') ? htmlPath : | 958 var basePath = TestUtils.dartDir().toString(); |
953 (htmlPath.startsWith('/') ? | 959 if (!htmlPath.startsWith('/') && !htmlPath.startsWith('http')) { |
954 'file://$htmlPath' : | 960 htmlPath = '/$htmlPath'; |
955 'file:///$htmlPath'); | 961 } |
| 962 htmlPath = htmlPath.startsWith(basePath) ? |
| 963 htmlPath.substring(basePath.length) : htmlPath; |
| 964 String fullHtmlPath = htmlPath; |
| 965 if (!htmlPath.startsWith('http')) { |
| 966 fullHtmlPath = 'http://127.0.0.1:${serverList[0].port}$htmlPath?' |
| 967 'crossOriginPort=${serverList[1].port}'; |
| 968 } |
956 if (info.optionsFromFile['isMultiHtmlTest'] | 969 if (info.optionsFromFile['isMultiHtmlTest'] |
957 && subtestNames.length > 0) { | 970 && subtestNames.length > 0) { |
958 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; | 971 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; |
959 } | 972 } |
960 | 973 |
961 if (TestUtils.usesWebDriver(runtime)) { | 974 if (TestUtils.usesWebDriver(runtime)) { |
962 args = [ | 975 args = [ |
963 dartDir.append('tools/testing/run_selenium.py').toNativePath(), | 976 dartDir.append('tools/testing/run_selenium.py').toNativePath(), |
964 '--browser=$runtime', | 977 '--browser=$runtime', |
965 '--timeout=${configuration["timeout"] - 2}', | 978 '--timeout=${configuration["timeout"] - 2}', |
966 '--out="$fullHtmlPath"']; | 979 '--out="$fullHtmlPath"']; |
967 if (runtime == 'dartium') { | 980 if (runtime == 'dartium') { |
968 args.add('--executable=$dartiumFilename'); | 981 args.add('--executable=$dartiumFilename'); |
969 } | 982 } |
970 if (subtestIndex != 0) { | 983 if (subtestIndex != 0) { |
971 args.add('--force-refresh'); | 984 args.add('--force-refresh'); |
972 } | 985 } |
973 commandSet.add(new Command('python', args)); | 986 commandSet.add(new Command('python', args)); |
974 } else { | 987 } else { |
975 Expect.isTrue(runtime == "drt"); | 988 Expect.isTrue(runtime == "drt"); |
976 | 989 |
977 var dartFlags = []; | 990 var dartFlags = []; |
978 var dumpRenderTreeOptions = []; | 991 var dumpRenderTreeOptions = []; |
979 var packageRootUri; | |
980 | 992 |
981 dumpRenderTreeOptions.add('--no-timeout'); | 993 dumpRenderTreeOptions.add('--no-timeout'); |
982 | 994 |
983 if (compiler == 'none' || compiler == 'dart2dart') { | 995 if (compiler == 'none' || compiler == 'dart2dart') { |
984 dartFlags.add('--ignore-unrecognized-flags'); | 996 dartFlags.add('--ignore-unrecognized-flags'); |
985 if (configuration["checked"]) { | 997 if (configuration["checked"]) { |
986 dartFlags.add('--enable_asserts'); | 998 dartFlags.add('--enable_asserts'); |
987 dartFlags.add("--enable_type_checks"); | 999 dartFlags.add("--enable_type_checks"); |
988 } | 1000 } |
989 dartFlags.addAll(vmOptions); | 1001 dartFlags.addAll(vmOptions); |
990 } | 1002 } |
991 if (compiler == 'none') { | |
992 var packageRootPath = packageRoot(optionsFromFile['packageRoot']); | |
993 if (packageRootPath != null) { | |
994 var absolutePath = | |
995 TestUtils.absolutePath(new Path(packageRootPath)); | |
996 packageRootUri = new Uri.fromComponents( | |
997 scheme: 'file', | |
998 path: absolutePath.toString()); | |
999 } | |
1000 } | |
1001 | 1003 |
1002 if (expectedOutput != null) { | 1004 if (expectedOutput != null) { |
1003 if (expectedOutput.toNativePath().endsWith('.png')) { | 1005 if (expectedOutput.toNativePath().endsWith('.png')) { |
1004 // pixel tests are specified by running DRT "foo.html'-p" | 1006 // pixel tests are specified by running DRT "foo.html'-p" |
1005 dumpRenderTreeOptions.add('--notree'); | 1007 dumpRenderTreeOptions.add('--notree'); |
1006 fullHtmlPath = "${fullHtmlPath}'-p"; | 1008 fullHtmlPath = "${fullHtmlPath}'-p"; |
1007 } | 1009 } |
1008 } | 1010 } |
1009 commandSet.add(new DumpRenderTreeCommand(dumpRenderTreeFilename, | 1011 commandSet.add(new DumpRenderTreeCommand(dumpRenderTreeFilename, |
1010 fullHtmlPath, | 1012 fullHtmlPath, |
1011 dumpRenderTreeOptions, | 1013 dumpRenderTreeOptions, |
1012 dartFlags, | 1014 dartFlags, |
1013 packageRootUri, | |
1014 expectedOutput)); | 1015 expectedOutput)); |
1015 } | 1016 } |
1016 | 1017 |
1017 // Create BrowserTestCase and queue it. | 1018 // Create BrowserTestCase and queue it. |
1018 String testDisplayName = '$suiteName/$testName'; | 1019 String testDisplayName = '$suiteName/$testName'; |
1019 var testCase; | 1020 var testCase; |
1020 if (info.optionsFromFile['isMultiHtmlTest']) { | 1021 if (info.optionsFromFile['isMultiHtmlTest']) { |
1021 testDisplayName = '$testDisplayName/${subtestNames[subtestIndex]}'; | 1022 testDisplayName = '$testDisplayName/${subtestNames[subtestIndex]}'; |
1022 testCase = new BrowserTestCase(testDisplayName, | 1023 testCase = new BrowserTestCase(testDisplayName, |
1023 commandSet, configuration, completeHandler, | 1024 commandSet, configuration, completeHandler, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 } | 1098 } |
1098 | 1099 |
1099 // Create '[build dir]/generated_tests/$compiler-$runtime/$testUniqueName', | 1100 // Create '[build dir]/generated_tests/$compiler-$runtime/$testUniqueName', |
1100 // including any intermediate directories that don't exist. | 1101 // including any intermediate directories that don't exist. |
1101 // If the tests are run in checked or minified mode we add that to the | 1102 // If the tests are run in checked or minified mode we add that to the |
1102 // '$compile-$runtime' directory name. | 1103 // '$compile-$runtime' directory name. |
1103 var checked = configuration['checked'] ? '-checked' : ''; | 1104 var checked = configuration['checked'] ? '-checked' : ''; |
1104 var minified = configuration['minified'] ? '-minified' : ''; | 1105 var minified = configuration['minified'] ? '-minified' : ''; |
1105 var dirName = "${configuration['compiler']}-${configuration['runtime']}" | 1106 var dirName = "${configuration['compiler']}-${configuration['runtime']}" |
1106 "$checked$minified"; | 1107 "$checked$minified"; |
1107 Path generatedTestPath = new Path.fromNative(buildDir) | 1108 Path generatedTestPath = new Path.fromNative(dartDir.toString()) |
| 1109 .append(buildDir.toString()) |
1108 .append('generated_tests') | 1110 .append('generated_tests') |
1109 .append(dirName) | 1111 .append(dirName) |
1110 .append(testUniqueName); | 1112 .append(testUniqueName); |
1111 | 1113 |
1112 TestUtils.mkdirRecursive(new Path('.'), generatedTestPath); | 1114 TestUtils.mkdirRecursive(new Path('.'), generatedTestPath); |
1113 return new File.fromPath(generatedTestPath).fullPathSync() | 1115 return new File.fromPath(generatedTestPath).fullPathSync() |
1114 .replaceAll('\\', '/'); | 1116 .replaceAll('\\', '/'); |
1115 } | 1117 } |
1116 | 1118 |
1117 String get scriptType { | 1119 String get scriptType { |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 outputDir = 'out/'; | 1751 outputDir = 'out/'; |
1750 } else if (system == 'macos') { | 1752 } else if (system == 'macos') { |
1751 outputDir = 'xcodebuild/'; | 1753 outputDir = 'xcodebuild/'; |
1752 } else if (system == 'windows') { | 1754 } else if (system == 'windows') { |
1753 outputDir = 'build/'; | 1755 outputDir = 'build/'; |
1754 } | 1756 } |
1755 return "$outputDir${configurationDir(configuration)}"; | 1757 return "$outputDir${configurationDir(configuration)}"; |
1756 } | 1758 } |
1757 | 1759 |
1758 static String configurationDir(Map configuration) { | 1760 static String configurationDir(Map configuration) { |
| 1761 // For regular dart checkouts, the configDir by default is mode+arch. |
| 1762 // For Dartium, the configDir by default is mode (as defined by the Chrome |
| 1763 // build setup). We can detect this because in the dartium checkout, the |
| 1764 // "output" directory is a sibling of the dart directory instead of a child. |
1759 var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release'; | 1765 var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release'; |
1760 var arch = configuration['arch'].toUpperCase(); | 1766 var arch = configuration['arch'].toUpperCase(); |
1761 return '$mode$arch'; | 1767 if (currentWorkingDirectory != dartDir()) { |
| 1768 return '$mode$arch'; |
| 1769 } else { |
| 1770 return mode; |
| 1771 } |
| 1772 } |
| 1773 |
| 1774 /** |
| 1775 * Returns the path to the dart binary checked into the repo, used for |
| 1776 * bootstrapping test.dart. |
| 1777 */ |
| 1778 static String get dartTestExecutable { |
| 1779 var path = '${TestUtils.dartDir()}/tools/testing/bin/' |
| 1780 '${Platform.operatingSystem}/dart'; |
| 1781 if (Platform.operatingSystem == 'windows') { |
| 1782 path = '$path.exe'; |
| 1783 } |
| 1784 return path; |
1762 } | 1785 } |
1763 } | 1786 } |
1764 | 1787 |
1765 class SummaryReport { | 1788 class SummaryReport { |
1766 static int total = 0; | 1789 static int total = 0; |
1767 static int skipped = 0; | 1790 static int skipped = 0; |
1768 static int noCrash = 0; | 1791 static int noCrash = 0; |
1769 static int pass = 0; | 1792 static int pass = 0; |
1770 static int failOk = 0; | 1793 static int failOk = 0; |
1771 static int fail = 0; | 1794 static int fail = 0; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1813 * $pass tests are expected to pass | 1836 * $pass tests are expected to pass |
1814 * $failOk tests are expected to fail that we won't fix | 1837 * $failOk tests are expected to fail that we won't fix |
1815 * $fail tests are expected to fail that we should fix | 1838 * $fail tests are expected to fail that we should fix |
1816 * $crash tests are expected to crash that we should fix | 1839 * $crash tests are expected to crash that we should fix |
1817 * $timeout tests are allowed to timeout | 1840 * $timeout tests are allowed to timeout |
1818 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1841 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
1819 """; | 1842 """; |
1820 print(report); | 1843 print(report); |
1821 } | 1844 } |
1822 } | 1845 } |
OLD | NEW |