| 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 // commands will be executed. On subsequent loop iterations, we | 990 // commands will be executed. On subsequent loop iterations, we |
| 991 // don't need to do any compilations. Thus we set "commandSet = []". | 991 // don't need to do any compilations. Thus we set "commandSet = []". |
| 992 commandSet = []; | 992 commandSet = []; |
| 993 } | 993 } |
| 994 | 994 |
| 995 var htmlPath_subtest = _createUrlPathFromFile(new Path(htmlPath)); | 995 var htmlPath_subtest = _createUrlPathFromFile(new Path(htmlPath)); |
| 996 var fullHtmlPath = _getUriForBrowserTest(info, htmlPath_subtest, | 996 var fullHtmlPath = _getUriForBrowserTest(info, htmlPath_subtest, |
| 997 subtestNames, subtestIndex); | 997 subtestNames, subtestIndex); |
| 998 | 998 |
| 999 List<String> args = <String>[]; | 999 List<String> args = <String>[]; |
| 1000 |
| 1000 if (TestUtils.usesWebDriver(runtime)) { | 1001 if (TestUtils.usesWebDriver(runtime)) { |
| 1001 args = [ | 1002 args = [ |
| 1002 dartDir.append('tools/testing/run_selenium.py').toNativePath(), | 1003 dartDir.append('tools/testing/run_selenium.py').toNativePath(), |
| 1003 '--browser=$runtime', | 1004 '--browser=$runtime', |
| 1004 // NOTE: This value will be overridden by the test runner | 1005 // NOTE: This value will be overridden by the test runner |
| 1005 '--timeout=${configuration['timeout']}', | 1006 '--timeout=${configuration['timeout']}', |
| 1006 '--out=$fullHtmlPath']; | 1007 '--out=$fullHtmlPath']; |
| 1007 if (runtime == 'dartium') { | 1008 if (runtime == 'dartium') { |
| 1008 args.add('--executable=$dartiumFilename'); | 1009 args.add('--executable=$dartiumFilename'); |
| 1009 } | 1010 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 } else { | 1059 } else { |
| 1059 testCase = new BrowserTestCase(testDisplayName, | 1060 testCase = new BrowserTestCase(testDisplayName, |
| 1060 commandSet, configuration, completeHandler, expectations, | 1061 commandSet, configuration, completeHandler, expectations, |
| 1061 info, info.hasCompileError || info.hasRuntimeError, false); | 1062 info, info.hasCompileError || info.hasRuntimeError, false); |
| 1062 } | 1063 } |
| 1063 if (subtestIndex == 0) { | 1064 if (subtestIndex == 0) { |
| 1064 multitestParentTest = testCase; | 1065 multitestParentTest = testCase; |
| 1065 } else { | 1066 } else { |
| 1066 multitestParentTest.addObserver(testCase); | 1067 multitestParentTest.addObserver(testCase); |
| 1067 } | 1068 } |
| 1069 testCase.testingUrl = fullHtmlPath; |
| 1070 |
| 1068 doTest(testCase); | 1071 doTest(testCase); |
| 1069 subtestIndex++; | 1072 subtestIndex++; |
| 1070 } while(subtestIndex < subtestNames.length); | 1073 } while(subtestIndex < subtestNames.length); |
| 1071 } | 1074 } |
| 1072 } | 1075 } |
| 1073 | 1076 |
| 1074 /** Helper to create a compilation command for a single input file. */ | 1077 /** Helper to create a compilation command for a single input file. */ |
| 1075 Command _compileCommand(String inputFile, String outputFile, | 1078 Command _compileCommand(String inputFile, String outputFile, |
| 1076 String compiler, String dir, vmOptions, optionsFromFile) { | 1079 String compiler, String dir, vmOptions, optionsFromFile) { |
| 1077 String executable = compilerPath; | 1080 String executable = compilerPath; |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1929 * $pass tests are expected to pass | 1932 * $pass tests are expected to pass |
| 1930 * $failOk tests are expected to fail that we won't fix | 1933 * $failOk tests are expected to fail that we won't fix |
| 1931 * $fail tests are expected to fail that we should fix | 1934 * $fail tests are expected to fail that we should fix |
| 1932 * $crash tests are expected to crash that we should fix | 1935 * $crash tests are expected to crash that we should fix |
| 1933 * $timeout tests are allowed to timeout | 1936 * $timeout tests are allowed to timeout |
| 1934 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1937 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1935 """; | 1938 """; |
| 1936 print(report); | 1939 print(report); |
| 1937 } | 1940 } |
| 1938 } | 1941 } |
| OLD | NEW |