Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file is the entrypoint of the dart test suite. This suite is used | 7 * This file is the entrypoint of the dart test suite. This suite is used |
| 8 * to test: | 8 * to test: |
| 9 * | 9 * |
| 10 * 1. the dart vm | 10 * 1. the dart vm |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 | 76 |
| 77 // Extract global options from first configuration. | 77 // Extract global options from first configuration. |
| 78 var firstConf = configurations[0]; | 78 var firstConf = configurations[0]; |
| 79 Map<String, RegExp> selectors = firstConf['selectors']; | 79 Map<String, RegExp> selectors = firstConf['selectors']; |
| 80 var maxProcesses = firstConf['tasks']; | 80 var maxProcesses = firstConf['tasks']; |
| 81 var progressIndicator = firstConf['progress']; | 81 var progressIndicator = firstConf['progress']; |
| 82 BuildbotProgressIndicator.stepName = firstConf['step_name']; | 82 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
| 83 var verbose = firstConf['verbose']; | 83 var verbose = firstConf['verbose']; |
| 84 var printTiming = firstConf['time']; | 84 var printTiming = firstConf['time']; |
| 85 var listTests = firstConf['list']; | 85 var listTests = firstConf['list']; |
| 86 var useContentSecurityPolicy = firstConf['csp']; | |
| 86 | 87 |
| 87 if (!firstConf['append_logs']) { | 88 if (!firstConf['append_logs']) { |
| 88 var file = new File(TestUtils.flakyFileName()); | 89 var file = new File(TestUtils.flakyFileName()); |
| 89 if (file.existsSync()) { | 90 if (file.existsSync()) { |
| 90 file.deleteSync(); | 91 file.deleteSync(); |
| 91 } | 92 } |
| 92 } | 93 } |
| 93 | 94 |
| 94 DebugLogger.init(firstConf['write_debug_log'] ? | 95 DebugLogger.init(firstConf['write_debug_log'] ? |
| 95 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); | 96 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 111 | 112 |
| 112 var runningBrowserTests = configurations.any((config) { | 113 var runningBrowserTests = configurations.any((config) { |
| 113 return TestUtils.isBrowserRuntime(config['runtime']); | 114 return TestUtils.isBrowserRuntime(config['runtime']); |
| 114 }); | 115 }); |
| 115 | 116 |
| 116 var testSuites = new List<TestSuite>(); | 117 var testSuites = new List<TestSuite>(); |
| 117 var maxBrowserProcesses = maxProcesses; | 118 var maxBrowserProcesses = maxProcesses; |
| 118 for (var conf in configurations) { | 119 for (var conf in configurations) { |
| 119 if (!listTests && runningBrowserTests) { | 120 if (!listTests && runningBrowserTests) { |
| 120 // Start global http servers that serve the entire dart repo. | 121 // Start global http servers that serve the entire dart repo. |
| 121 // The http server is available on window.location.port, and a second | 122 // The http server is available on window.location.port, and a second |
| 122 // server for cross-domain tests can be found by calling | 123 // server for cross-domain tests can be found by calling |
| 123 // getCrossOriginPortNumber(). | 124 // getCrossOriginPortNumber(). |
| 124 var servers = new TestingServers(new Path(TestUtils.buildDir(conf))); | 125 var servers = new TestingServers(new Path(TestUtils.buildDir(conf)), |
| 126 useContentSecurityPolicy); | |
|
kustermann
2013/02/28 08:34:50
Since the second parameter is not optional, you ne
ricow1
2013/02/28 08:36:07
You also need to do this in tools/test-runtime.dar
kasperl
2013/02/28 08:54:49
I'll do that, but I *strongly* object to this. I d
| |
| 125 servers.startServers('127.0.0.1'); | 127 servers.startServers('127.0.0.1'); |
| 126 conf['_servers_'] = servers; | 128 conf['_servers_'] = servers; |
| 127 } | 129 } |
| 128 | 130 |
| 129 // There should not be more than one InternetExplorerDriver instance | 131 // There should not be more than one InternetExplorerDriver instance |
| 130 // running at a time. For details, see | 132 // running at a time. For details, see |
| 131 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. | 133 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. |
| 132 if (conf['runtime'].startsWith('ie')) { | 134 if (conf['runtime'].startsWith('ie')) { |
| 133 maxBrowserProcesses = 1; | 135 maxBrowserProcesses = 1; |
| 134 } | 136 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 new ProcessQueue(maxProcesses, | 170 new ProcessQueue(maxProcesses, |
| 169 maxBrowserProcesses, | 171 maxBrowserProcesses, |
| 170 progressIndicator, | 172 progressIndicator, |
| 171 startTime, | 173 startTime, |
| 172 printTiming, | 174 printTiming, |
| 173 testSuites, | 175 testSuites, |
| 174 allTestsFinished, | 176 allTestsFinished, |
| 175 verbose, | 177 verbose, |
| 176 listTests); | 178 listTests); |
| 177 } | 179 } |
| OLD | NEW |