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

Side by Side Diff: tools/migration/bin/run_tests.dart

Issue 2988423002: Add more targets to run_tests based on experience in blocks 7 and 8 (Closed)
Patch Set: Created 3 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Runs the tests in a batch on the various configurations used on the bots. 5 /// Runs the tests in a batch on the various configurations used on the bots.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
11 import 'package:path/path.dart' as p; 11 import 'package:path/path.dart' as p;
12 12
13 import 'package:migration/src/fork.dart'; 13 import 'package:migration/src/fork.dart';
14 import 'package:migration/src/log.dart'; 14 import 'package:migration/src/log.dart';
15 15
16 const appJit = "--compiler=app_jit"; 16 const appJit = "--compiler=app_jit";
17 const dart2js = "--compiler=dart2js"; 17 const dart2js = "--compiler=dart2js";
18 const dartdevc = "--compiler=dartdevc"; 18 const dartdevc = "--compiler=dartdevc";
19 const noCompiler = "--compiler=none"; 19 const noCompiler = "--compiler=none";
20 const precompiler = "--compiler=precompiler"; 20 const precompiler = "--compiler=precompiler";
21 const analyzer = "--compiler=dart2analyzer"; 21 const analyzer = "--compiler=dart2analyzer";
22 const dartk = "--compiler=dartk";
22 23
23 const chrome = "--runtime=chrome"; 24 const chrome = "--runtime=chrome";
24 const precompiled = "--runtime=dart_precompiled"; 25 const precompiled = "--runtime=dart_precompiled";
25 const noRuntime = "--runtime=none"; 26 const noRuntime = "--runtime=none";
26 const vm = "--runtime=vm"; 27 const vm = "--runtime=vm";
28 const jsshell = "--runtime=jsshell";
27 29
28 const checked = "--checked"; 30 const checked = "--checked";
29 const dart2jsBatch = "--dart2js-batch"; 31 const dart2jsBatch = "--dart2js-batch";
32 const fastStartup = "--fast-startup";
30 const useSdk = "--use-sdk"; 33 const useSdk = "--use-sdk";
34 const releaseMode = "--mode=release";
31 const productMode = "--mode=product"; 35 const productMode = "--mode=product";
32 const strong = "--strong"; 36 const strong = "--strong";
33 37
34 /// Maps configuration names to a corresponding set of test.dart command line 38 /// Maps configuration names to a corresponding set of test.dart command line
35 /// arguments. 39 /// arguments.
36 /// 40 ///
37 /// Each configuration name starts with the name of a column on the buildbot 41 /// Each configuration name starts with the name of a column on the buildbot
38 /// waterfall (except for "dartjs-linux" which is just called "dart2js" here) 42 /// waterfall (except for "dartjs-linux" which is just called "dart2js" here)
39 /// possibly followed by some modifier for a specific bot or annotated step on 43 /// possibly followed by some modifier for a specific bot or annotated step on
40 /// a bot. The configs here are ordered the same order as the waterfall. 44 /// a bot. The configs here are ordered the same order as the waterfall.
41 final allConfigs = { 45 final allConfigs = {
42 "vm": [noCompiler, vm], 46 "vm": [noCompiler, vm],
43 "vm-checked": [noCompiler, vm, checked], 47 "vm-checked": [noCompiler, vm, checked],
44 "vm-app": [appJit, vm], 48 "vm-app": [appJit, vm],
45 "vm-app-product": [productMode, appJit, vm], 49 "vm-app-product": [productMode, appJit, vm],
46 // TODO(rnystrom): What build target do we need to get this to work? 50 "vm-kernel": [dartk, releaseMode, vm],
47 // "vm-precomp": [precompiler, precompiled], 51 "vm-precomp": [precompiler, precompiled],
48 "vm-product": [productMode, noCompiler, vm], 52 "vm-product": [productMode, noCompiler, vm],
49 // TODO(rnystrom): Add dart2js-d8-hostchecked, dart2js-d8-minified, or 53 // TODO(rnystrom): Add dart2js-d8-hostchecked, dart2js-d8-minified, or
50 // dart2js-jsshell? 54 // dart2js-jsshell?
51 "analyzer": [analyzer, noRuntime, useSdk], 55 "analyzer": [analyzer, noRuntime, useSdk],
52 "analyzer-checked": [analyzer, noRuntime, checked, useSdk], 56 "analyzer-checked": [analyzer, noRuntime, checked, useSdk],
53 "dart2js": [dart2js, chrome, useSdk, dart2jsBatch], 57 "dart2js": [dart2js, chrome, useSdk, dart2jsBatch],
58 "dart2js-jsshell": [dart2js, jsshell, fastStartup, useSdk, dart2jsBatch],
54 // TODO(rnystrom): Is it worth running dart2js on Firefox too? 59 // TODO(rnystrom): Is it worth running dart2js on Firefox too?
55 "dartdevc": [dartdevc, chrome, useSdk, strong] 60 "dartdevc": [dartdevc, chrome, useSdk, strong],
56 }; 61 };
57 62
58 final buildSteps = [ 63 final buildSteps = [
59 // The SDK, which also builds the VM. 64 // The SDK, which also builds the VM.
60 ["--mode=release", "create_sdk"], 65 ["--mode=release", "create_sdk"],
66 // The kernel service.
67 ["--mode=release", "kernel-service"],
68 // Precompiled runtime for release
69 ["--mode=release", "runtime_precompiled"],
61 // Product version of the runtime and precompiled runtime. 70 // Product version of the runtime and precompiled runtime.
62 ["--mode=product", "runtime", "runtime_precompiled"], 71 ["--mode=product", "runtime", "runtime_precompiled"],
63 // Dartdevc and its dependencies. 72 // Dartdevc and its dependencies.
64 ["--mode=release", "dartdevc_test"], 73 ["--mode=release", "dartdevc_test"],
65 ]; 74 ];
66 75
67 Future<Null> main(List<String> arguments) async { 76 Future<Null> main(List<String> arguments) async {
68 var argParser = new ArgParser(allowTrailingOptions: true); 77 var argParser = new ArgParser(allowTrailingOptions: true);
69 argParser.addFlag("build", help: "Build runtimes before running tests."); 78 argParser.addFlag("build", help: "Build runtimes before running tests.");
70 argParser.addOption("config", 79 argParser.addOption("config",
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 process.stdout.listen((bytes) { 195 process.stdout.listen((bytes) {
187 stdout.add(bytes); 196 stdout.add(bytes);
188 }); 197 });
189 198
190 process.stderr.listen((bytes) { 199 process.stderr.listen((bytes) {
191 stderr.add(bytes); 200 stderr.add(bytes);
192 }); 201 });
193 202
194 return await process.exitCode; 203 return await process.exitCode;
195 } 204 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698