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

Unified Diff: tools/test_compiler.dart

Issue 9139017: Make test_wrapper.py and test_compiler.dart that will work for a deps.compiler checkout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/test_wrapper.py » ('j') | tools/test_wrapper.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test_compiler.dart
diff --git a/tools/test_compiler.dart b/tools/test_compiler.dart
new file mode 100644
index 0000000000000000000000000000000000000000..337e962b55739830c1b6c1c340c334fd77d360d4
--- /dev/null
+++ b/tools/test_compiler.dart
@@ -0,0 +1,88 @@
+#!/usr/bin/env dart
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
Søren Gjesse 2012/01/12 13:54:26 I think we should have a comment here (and in all
+#library("test");
+
+#import("testing/dart/test_runner.dart");
+#import("testing/dart/test_options.dart");
+
+#import("../tests/co19/test_config.dart");
+#import("../tests/corelib/test_config.dart");
+#import("../tests/isolate/test_config.dart");
+#import("../tests/language/test_config.dart");
+#import("../tests/standalone/test_config.dart");
+#import("../tests/stub-generator/test_config.dart");
+#import("../runtime/tests/vm/test_config.dart");
+#import("../samples/tests/samples/test_config.dart");
+#import("../client/tests/dartc/test_config.dart");
+#import("../compiler/tests/dartc/test_config.dart");
+#import("../client/tests/client/test_config.dart");
+
+
+main() {
+ var startTime = new Date.now();
+ var optionsParser = new TestOptionsParser();
+ List<Map> configurations = optionsParser.parse(new Options().arguments);
+ if (configurations == null) return;
+
+ // Extract global options from first configuration.
+ var firstConf = configurations[0];
+ Map<String, RegExp> selectors = firstConf['selectors'];
+ var maxProcesses = firstConf['tasks'];
+ var progressIndicator = firstConf['progress'];
+ var verbose = firstConf['verbose'];
+ var printTiming = firstConf['time'];
+ var listTests = firstConf['list'];
+
+ var configurationIterator = configurations.iterator();
+ bool enqueueConfiguration(ProcessQueue queue) {
+ if (!configurationIterator.hasNext()) {
+ return false;
+ }
+
+ var conf = configurationIterator.next();
+ if (selectors.containsKey('samples')) {
+ queue.addTestSuite(new SamplesTestSuite(conf));
+ }
+ if (selectors.containsKey('standalone')) {
+ queue.addTestSuite(new StandaloneTestSuite(conf));
+ }
+ if (selectors.containsKey('corelib')) {
+ queue.addTestSuite(new CorelibTestSuite(conf));
+ }
+ if (selectors.containsKey('co19')) {
+ queue.addTestSuite(new Co19TestSuite(conf));
+ }
+ if (selectors.containsKey('language')) {
+ queue.addTestSuite(new LanguageTestSuite(conf));
+ }
+ if (selectors.containsKey('isolate')) {
+ queue.addTestSuite(new IsolateTestSuite(conf));
+ }
+ if (selectors.containsKey('stub-generator')) {
+ queue.addTestSuite(new StubGeneratorTestSuite(conf));
+ }
+ if (conf['component'] == 'dartc' && selectors.containsKey('dartc')) {
+ queue.addTestSuite(new ClientDartcTestSuite(conf));
+ }
+ if (conf['component'] == 'dartc' && selectors.containsKey('dartc')) {
+ queue.addTestSuite(new JUnitDartcTestSuite(conf));
+ }
+ if (selectors.containsKey('client')) {
+ queue.addTestSuite(new ClientTestSuite(conf));
+ }
+
+ return true;
+ }
+
+ // Start process queue.
+ var queue = new ProcessQueue(maxProcesses,
+ progressIndicator,
+ startTime,
+ printTiming,
+ enqueueConfiguration,
+ verbose: verbose,
+ listTests: listTests);
+}
« no previous file with comments | « no previous file | tools/test_wrapper.py » ('j') | tools/test_wrapper.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698