Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: tools/test.dart

Issue 9838068: Rename test.dart component to specify compiler + runtime. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/utils/utils.status ('k') | tools/test-compiler.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #import("../frog/tests/native/test_config.dart"); 45 #import("../frog/tests/native/test_config.dart");
46 #import("../frog/tests/await/test_config.dart"); 46 #import("../frog/tests/await/test_config.dart");
47 #import("../utils/tests/css/test_config.dart"); 47 #import("../utils/tests/css/test_config.dart");
48 #import("../utils/tests/import_mapper/test_config.dart"); 48 #import("../utils/tests/import_mapper/test_config.dart");
49 #import("../utils/tests/peg/test_config.dart"); 49 #import("../utils/tests/peg/test_config.dart");
50 50
51 main() { 51 main() {
52 var startTime = new Date.now(); 52 var startTime = new Date.now();
53 var optionsParser = new TestOptionsParser(); 53 var optionsParser = new TestOptionsParser();
54 List<Map> configurations = optionsParser.parse(new Options().arguments); 54 List<Map> configurations = optionsParser.parse(new Options().arguments);
55 if (configurations == null) return; 55 if (configurations == null || configurations.length == 0) return;
56 56
57 // Extract global options from first configuration. 57 // Extract global options from first configuration.
58 var firstConf = configurations[0]; 58 var firstConf = configurations[0];
59 Map<String, RegExp> selectors = firstConf['selectors']; 59 Map<String, RegExp> selectors = firstConf['selectors'];
60 var maxProcesses = firstConf['tasks']; 60 var maxProcesses = firstConf['tasks'];
61 var progressIndicator = firstConf['progress']; 61 var progressIndicator = firstConf['progress'];
62 var verbose = firstConf['verbose']; 62 var verbose = firstConf['verbose'];
63 var printTiming = firstConf['time']; 63 var printTiming = firstConf['time'];
64 var listTests = firstConf['list']; 64 var listTests = firstConf['list'];
65 var keepGeneratedTests = firstConf['keep-generated-tests']; 65 var keepGeneratedTests = firstConf['keep-generated-tests'];
66 66
67 // Print the configurations being run by this execution of 67 // Print the configurations being run by this execution of
68 // test.dart. However, don't do it if the silent progress indicator 68 // test.dart. However, don't do it if the silent progress indicator
69 // is used. This is only needed because of the junit tests. 69 // is used. This is only needed because of the junit tests.
70 if (progressIndicator != 'silent') { 70 if (progressIndicator != 'silent') {
71 StringBuffer sb = new StringBuffer('Test configuration'); 71 StringBuffer sb = new StringBuffer('Test configuration');
72 sb.add(configurations.length > 1 ? 's:' : ':'); 72 sb.add(configurations.length > 1 ? 's:' : ':');
73 for (Map conf in configurations) { 73 for (Map conf in configurations) {
74 sb.add(' ${conf["component"]}_${conf["mode"]}_${conf["arch"]}'); 74 sb.add(' ${conf["compiler"]}_${conf["runtime"]}_${conf["mode"]}_' +
75 '${conf["arch"]}');
75 if (conf['checked']) sb.add('_checked'); 76 if (conf['checked']) sb.add('_checked');
76 } 77 }
77 print(sb); 78 print(sb);
78 } 79 }
79 80
80 var configurationIterator = configurations.iterator(); 81 var configurationIterator = configurations.iterator();
81 bool enqueueConfiguration(ProcessQueue queue) { 82 bool enqueueConfiguration(ProcessQueue queue) {
82 if (!configurationIterator.hasNext()) { 83 if (!configurationIterator.hasNext()) {
83 return false; 84 return false;
84 } 85 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Start process queue. 150 // Start process queue.
150 var queue = new ProcessQueue(maxProcesses, 151 var queue = new ProcessQueue(maxProcesses,
151 progressIndicator, 152 progressIndicator,
152 startTime, 153 startTime,
153 printTiming, 154 printTiming,
154 enqueueConfiguration, 155 enqueueConfiguration,
155 verbose, 156 verbose,
156 listTests, 157 listTests,
157 keepGeneratedTests); 158 keepGeneratedTests);
158 } 159 }
OLDNEW
« no previous file with comments | « tests/utils/utils.status ('k') | tools/test-compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698