Chromium Code Reviews| 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 // Note: If we run test.py with the "--list" option, no http servers |
| 975 'crossOriginPort=${serverList[1].port}'; | 975 // will be started. |
| 976 var serverPort = "PORT"; | |
|
ahe
2013/01/25 12:40:23
It is kinda hard to understand how this works. Cou
kustermann
2013/01/28 11:20:54
This doesn't prevent servers from starting. In too
| |
| 977 var crossOriginPort = "CROSS_ORIGIN_PORT"; | |
| 978 if (!configuration['list']) { | |
| 979 serverPort = serverList[0].port; | |
|
ricow1
2013/01/24 14:06:14
this is probably slightly messing up types, what a
kustermann
2013/01/28 11:20:54
Done.
| |
| 980 crossOriginPort = serverList[1].port; | |
| 981 } | |
| 982 fullHtmlPath = 'http://127.0.0.1:$serverPort$htmlPath?' | |
| 983 'crossOriginPort=$crossOriginPort'; | |
| 976 } | 984 } |
| 977 if (info.optionsFromFile['isMultiHtmlTest'] | 985 if (info.optionsFromFile['isMultiHtmlTest'] |
| 978 && subtestNames.length > 0) { | 986 && subtestNames.length > 0) { |
| 979 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; | 987 fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; |
| 980 } | 988 } |
| 981 | 989 |
| 982 if (TestUtils.usesWebDriver(runtime)) { | 990 if (TestUtils.usesWebDriver(runtime)) { |
| 983 args = [ | 991 args = [ |
| 984 dartDir.append('tools/testing/run_selenium.py').toNativePath(), | 992 dartDir.append('tools/testing/run_selenium.py').toNativePath(), |
| 985 '--browser=$runtime', | 993 '--browser=$runtime', |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1897 * $pass tests are expected to pass | 1905 * $pass tests are expected to pass |
| 1898 * $failOk tests are expected to fail that we won't fix | 1906 * $failOk tests are expected to fail that we won't fix |
| 1899 * $fail tests are expected to fail that we should fix | 1907 * $fail tests are expected to fail that we should fix |
| 1900 * $crash tests are expected to crash that we should fix | 1908 * $crash tests are expected to crash that we should fix |
| 1901 * $timeout tests are allowed to timeout | 1909 * $timeout tests are allowed to timeout |
| 1902 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1910 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1903 """; | 1911 """; |
| 1904 print(report); | 1912 print(report); |
| 1905 } | 1913 } |
| 1906 } | 1914 } |
| OLD | NEW |