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

Unified Diff: tools/testing/dart/main.dart

Issue 2848103002: Move test.dart into testing/dart. (Closed)
Patch Set: Created 3 years, 8 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
Index: tools/testing/dart/main.dart
diff --git a/tools/testing/dart/main.dart b/tools/testing/dart/main.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e02e5d78571b8145d2a3ed30ba223471c49d2db6
--- /dev/null
+++ b/tools/testing/dart/main.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2017, 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.
+
+/// This file is the entrypoint of the Dart repository's custom test system.
+/// It is used to test:
+///
+/// 1. The Dart VM
+/// 2. The dart2js compiler
+/// 3. The static analyzer
+/// 4. The Dart core library
+/// 5. Other standard dart libraries (DOM bindings, UI libraries,
+/// IO libraries etc.)
+///
+/// This script is normally invoked by test.py. (test.py finds the Dart VM and
+/// passes along all command line arguments to this script.)
+///
+/// The command line args of this script are documented in "test_options.dart".
+/// They are printed when this script is run with "--help".
+///
+/// The default test directory layout is documented in "test_suite.dart", above
+/// `factory StandardTestSuite.forDirectory`.
+import "dart:io";
+
+import "test_configurations.dart";
+import "test_options.dart";
+import "test_progress.dart";
+import "test_suite.dart";
+
+/// Runs all of the tests specified by the given command line [arguments].
+void main(List<String> arguments) {
+ // This script is in "<repo>/tools/testing/dart".
+ TestUtils.setDartDirUri(Platform.script.resolve('../../..'));
+
+ // Clean up any stale temp directories from previous runs.
+ if (Platform.environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] ==
+ '1') {
+ LeftOverTempDirPrinter.deleteAll();
Bill Hesse 2017/05/02 14:33:08 I see that this has become a sync call, so OK.
Bob Nystrom 2017/05/02 23:48:15 Yup. I didn't see much benefit to making it async.
+ }
+
+ // Parse the command line arguments to a configuration.
+ var optionsParser = new TestOptionsParser();
+ var configurations = optionsParser.parse(arguments);
+ if (configurations == null || configurations.isEmpty) return;
+
+ // Run all of the configured tests.
+ // TODO(26372): Ensure that all tasks complete and return a future from this
+ // function.
+ testConfigurations(configurations);
+}

Powered by Google App Engine
This is Rietveld 408576698