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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 | 964 |
965 List<String> args = <String>[]; | 965 List<String> args = <String>[]; |
966 var basePath = TestUtils.dartDir().toString(); | 966 var basePath = TestUtils.dartDir().toString(); |
967 if (!htmlPath.startsWith('/') && !htmlPath.startsWith('http')) { | 967 if (!htmlPath.startsWith('/') && !htmlPath.startsWith('http')) { |
968 htmlPath = '/$htmlPath'; | 968 htmlPath = '/$htmlPath'; |
969 } | 969 } |
970 htmlPath = htmlPath.startsWith(basePath) ? | 970 htmlPath = htmlPath.startsWith(basePath) ? |
971 htmlPath.substring(basePath.length) : htmlPath; | 971 htmlPath.substring(basePath.length) : htmlPath; |
972 String fullHtmlPath = htmlPath; | 972 String fullHtmlPath = htmlPath; |
973 if (!htmlPath.startsWith('http')) { | 973 if (!htmlPath.startsWith('http')) { |
974 fullHtmlPath = 'http://127.0.0.1:${serverList[0].port}$htmlPath?' | 974 if (!configuration['list']) { |
975 'crossOriginPort=${serverList[1].port}'; | 975 fullHtmlPath = 'http://127.0.0.1:${serverList[0].port}$htmlPath?' |
| 976 'crossOriginPort=${serverList[1].port}'; |
| 977 } |
976 } | 978 } |
977 if (info.optionsFromFile['isMultiHtmlTest'] | 979 if (info.optionsFromFile['isMultiHtmlTest'] |
978 && subtestNames.length > 0) { | 980 && subtestNames.length > 0) { |
979 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; | 981 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; |
980 } | 982 } |
981 | 983 |
982 if (TestUtils.usesWebDriver(runtime)) { | 984 if (TestUtils.usesWebDriver(runtime)) { |
983 args = [ | 985 args = [ |
984 dartDir.append('tools/testing/run_selenium.py').toNativePath(), | 986 dartDir.append('tools/testing/run_selenium.py').toNativePath(), |
985 '--browser=$runtime', | 987 '--browser=$runtime', |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1707 * Assumes that the directory for [dest] already exists. | 1709 * Assumes that the directory for [dest] already exists. |
1708 */ | 1710 */ |
1709 static Future copyFile(Path source, Path dest) { | 1711 static Future copyFile(Path source, Path dest) { |
1710 var output = new File.fromPath(dest).openOutputStream(); | 1712 var output = new File.fromPath(dest).openOutputStream(); |
1711 new File.fromPath(source).openInputStream().pipe(output); | 1713 new File.fromPath(source).openInputStream().pipe(output); |
1712 var completer = new Completer(); | 1714 var completer = new Completer(); |
1713 output.onClosed = (){ completer.complete(null); }; | 1715 output.onClosed = (){ completer.complete(null); }; |
1714 return completer.future; | 1716 return completer.future; |
1715 } | 1717 } |
1716 | 1718 |
| 1719 static Path debugLogfile() { |
| 1720 return new Path(".debug.log"); |
| 1721 } |
| 1722 |
1717 static String flakyFileName() { | 1723 static String flakyFileName() { |
1718 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) | 1724 // If a flaky test did fail, infos about it (i.e. test name, stdin, stdout) |
1719 // will be written to this file. This is useful for the debugging of | 1725 // will be written to this file. This is useful for the debugging of |
1720 // flaky tests. | 1726 // flaky tests. |
1721 // When running on a built bot, the file can be made visible in the | 1727 // When running on a built bot, the file can be made visible in the |
1722 // waterfall UI. | 1728 // waterfall UI. |
1723 return ".flaky.log"; | 1729 return ".flaky.log"; |
1724 } | 1730 } |
1725 | 1731 |
1726 static void ensureExists(String filename, Map configuration) { | 1732 static void ensureExists(String filename, Map configuration) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1893 * $pass tests are expected to pass | 1899 * $pass tests are expected to pass |
1894 * $failOk tests are expected to fail that we won't fix | 1900 * $failOk tests are expected to fail that we won't fix |
1895 * $fail tests are expected to fail that we should fix | 1901 * $fail tests are expected to fail that we should fix |
1896 * $crash tests are expected to crash that we should fix | 1902 * $crash tests are expected to crash that we should fix |
1897 * $timeout tests are allowed to timeout | 1903 * $timeout tests are allowed to timeout |
1898 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1904 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
1899 """; | 1905 """; |
1900 print(report); | 1906 print(report); |
1901 } | 1907 } |
1902 } | 1908 } |
OLD | NEW |