| 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 // TODO(ager): Get rid of this version of test.dart when we don't have | 6 // TODO(ager): Get rid of this version of test.dart when we don't have |
| 7 // to worry about the special runtime checkout anymore. | 7 // to worry about the special runtime checkout anymore. |
| 8 // This file is identical to test.dart with test suites in the | 8 // This file is identical to test.dart with test suites in the |
| 9 // directories samples, client, compiler, and utils removed. | 9 // directories samples, client, compiler, and utils removed. |
| 10 | 10 |
| 11 #library("test"); | 11 #library("test"); |
| 12 | 12 |
| 13 #import("dart:io"); | 13 #import("dart:io"); |
| 14 #import("testing/dart/test_progress.dart"); |
| 14 #import("testing/dart/test_runner.dart"); | 15 #import("testing/dart/test_runner.dart"); |
| 15 #import("testing/dart/test_options.dart"); | 16 #import("testing/dart/test_options.dart"); |
| 16 #import("testing/dart/test_suite.dart"); | 17 #import("testing/dart/test_suite.dart"); |
| 17 #import("testing/dart/http_server.dart"); | 18 #import("testing/dart/http_server.dart"); |
| 18 | 19 |
| 19 #import("../tests/co19/test_config.dart"); | 20 #import("../tests/co19/test_config.dart"); |
| 20 #import("../runtime/tests/vm/test_config.dart"); | 21 #import("../runtime/tests/vm/test_config.dart"); |
| 21 | 22 |
| 22 /** | 23 /** |
| 23 * The directories that contain test suites which follow the conventions | 24 * The directories that contain test suites which follow the conventions |
| (...skipping 19 matching lines...) Expand all Loading... |
| 43 if (configurations == null) return; | 44 if (configurations == null) return; |
| 44 | 45 |
| 45 // Extract global options from first configuration. | 46 // Extract global options from first configuration. |
| 46 var firstConf = configurations[0]; | 47 var firstConf = configurations[0]; |
| 47 Map<String, RegExp> selectors = firstConf['selectors']; | 48 Map<String, RegExp> selectors = firstConf['selectors']; |
| 48 var maxProcesses = firstConf['tasks']; | 49 var maxProcesses = firstConf['tasks']; |
| 49 var progressIndicator = firstConf['progress']; | 50 var progressIndicator = firstConf['progress']; |
| 50 var verbose = firstConf['verbose']; | 51 var verbose = firstConf['verbose']; |
| 51 var printTiming = firstConf['time']; | 52 var printTiming = firstConf['time']; |
| 52 var listTests = firstConf['list']; | 53 var listTests = firstConf['list']; |
| 53 | 54 var appendFlakyLog = firstConf['append_flaky_log']; |
| 55 |
| 56 if (!appendFlakyLog) { |
| 57 var file = new File(FAILED_FLAKY_TESTS_LOGFILE); |
| 58 if (file.existsSync()) { |
| 59 file.deleteSync(); |
| 60 } |
| 61 } |
| 54 // Print the configurations being run by this execution of | 62 // Print the configurations being run by this execution of |
| 55 // test.dart. However, don't do it if the silent progress indicator | 63 // test.dart. However, don't do it if the silent progress indicator |
| 56 // is used. This is only needed because of the junit tests. | 64 // is used. This is only needed because of the junit tests. |
| 57 if (progressIndicator != 'silent') { | 65 if (progressIndicator != 'silent') { |
| 58 List output_words = configurations.length > 1 ? | 66 List output_words = configurations.length > 1 ? |
| 59 ['Test configurations:'] : ['Test configuration:']; | 67 ['Test configurations:'] : ['Test configuration:']; |
| 60 for (Map conf in configurations) { | 68 for (Map conf in configurations) { |
| 61 List settings = | 69 List settings = |
| 62 ['compiler', 'runtime', 'mode', 'arch'].map((name) => conf[name]); | 70 ['compiler', 'runtime', 'mode', 'arch'].map((name) => conf[name]); |
| 63 if (conf['checked']) settings.add('checked'); | 71 if (conf['checked']) settings.add('checked'); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 new ProcessQueue( | 112 new ProcessQueue( |
| 105 maxProcesses, | 113 maxProcesses, |
| 106 progressIndicator, | 114 progressIndicator, |
| 107 startTime, | 115 startTime, |
| 108 printTiming, | 116 printTiming, |
| 109 enqueueConfiguration, | 117 enqueueConfiguration, |
| 110 () => terminateHttpServer(), | 118 () => terminateHttpServer(), |
| 111 verbose, | 119 verbose, |
| 112 listTests); | 120 listTests); |
| 113 } | 121 } |
| OLD | NEW |