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

Side by Side Diff: tools/test.dart

Issue 2848103002: Move test.dart into testing/dart. (Closed)
Patch Set: Remove pointless LeftOverTempDirPrinter class. Created 3 years, 7 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
« no previous file with comments | « no previous file | tools/test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env dart
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
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.
5
6 /**
7 * This file is the entrypoint of the dart test suite. This suite is used
8 * to test:
9 *
10 * 1. the dart vm
11 * 2. the dart2js compiler
12 * 3. the static analyzer
13 * 4. the dart core library
14 * 5. other standard dart libraries (DOM bindings, ui libraries,
15 * io libraries etc.)
16 *
17 * This script is normally invoked by test.py. (test.py finds the dart vm
18 * and passes along all command line arguments to this script.)
19 *
20 * The command line args of this script are documented in
21 * "tools/testing/dart/test_options.dart"; they are printed
22 * when this script is run with "--help".
23 *
24 * The default test directory layout is documented in
25 * "tools/testing/dart/test_suite.dart", above
26 * "factory StandardTestSuite.forDirectory".
27 */
28
29 library test;
30
31 import "dart:async";
32 import "dart:io";
33 import "testing/dart/test_configurations.dart";
34 import "testing/dart/test_options.dart";
35 import "testing/dart/test_progress.dart";
36 import "testing/dart/test_suite.dart";
37 import "testing/dart/utils.dart";
38
39 Future _deleteTemporaryDartDirectories() {
40 var completer = new Completer();
41 var environment = Platform.environment;
42 if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') {
43 LeftOverTempDirPrinter.getLeftOverTemporaryDirectories().listen(
44 (FileSystemEntity tempEntity) {
45 Directory tempDirectory = tempEntity as Directory;
46 try {
47 tempDirectory.deleteSync(recursive: true);
48 } catch (error) {
49 DebugLogger.error(error);
50 }
51 }, onDone: completer.complete);
52 } else {
53 completer.complete();
54 }
55 return completer.future;
56 }
57
58 void main(List<String> arguments) {
59 // This script is in [sdk]/tools.
60 TestUtils.setDartDirUri(Platform.script.resolve('..'));
61 _deleteTemporaryDartDirectories().then((_) {
62 var optionsParser = new TestOptionsParser();
63 var configurations = optionsParser.parse(arguments);
64 if (configurations != null && configurations.length > 0) {
65 // All the testing is carried out asynchronously in tasks created by this
66 // call.
67 // TODO(26372): Ensure that all tasks complete before the returned future.
68 testConfigurations(configurations);
69 }
70 });
71 }
OLDNEW
« no previous file with comments | « no previous file | tools/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698