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

Side by Side Diff: tools/test.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 | « tools/stm/one-stm-lib.sh ('k') | tools/testing/dart/compiler_configuration.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) 2013, the Dart project authors. Please see the AUTHORS file 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 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 21 matching lines...) Expand all
32 import "dart:io"; 32 import "dart:io";
33 import "dart:math" as math; 33 import "dart:math" as math;
34 import "testing/dart/browser_controller.dart"; 34 import "testing/dart/browser_controller.dart";
35 import "testing/dart/http_server.dart"; 35 import "testing/dart/http_server.dart";
36 import "testing/dart/test_options.dart"; 36 import "testing/dart/test_options.dart";
37 import "testing/dart/test_progress.dart"; 37 import "testing/dart/test_progress.dart";
38 import "testing/dart/test_runner.dart"; 38 import "testing/dart/test_runner.dart";
39 import "testing/dart/test_suite.dart"; 39 import "testing/dart/test_suite.dart";
40 import "testing/dart/utils.dart"; 40 import "testing/dart/utils.dart";
41 41
42 import 'testing/dart/fletch_warnings_suite.dart' show 42 import 'testing/dart/dartino_warnings_suite.dart' show
43 FletchWarningsSuite; 43 DartinoWarningsSuite;
44 44
45 import 'testing/dart/fletch_test_suite.dart' show 45 import 'testing/dart/dartino_test_suite.dart' show
46 FletchTestSuite; 46 DartinoTestSuite;
47 47
48 //import "../runtime/tests/vm/test_config.dart"; 48 //import "../runtime/tests/vm/test_config.dart";
49 //import "../tests/co19/test_config.dart"; 49 //import "../tests/co19/test_config.dart";
50 50
51 /** 51 /**
52 * The directories that contain test suites which follow the conventions 52 * The directories that contain test suites which follow the conventions
53 * required by [StandardTestSuite]'s forDirectory constructor. 53 * required by [StandardTestSuite]'s forDirectory constructor.
54 * New test suites should follow this convention because it makes it much 54 * New test suites should follow this convention because it makes it much
55 * simpler to add them to test.dart. Existing test suites should be 55 * simpler to add them to test.dart. Existing test suites should be
56 * moved to here, if possible. 56 * moved to here, if possible.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 Browser.deleteCache = firstConf['clear_browser_cache']; 100 Browser.deleteCache = firstConf['clear_browser_cache'];
101 101
102 if (recordingPath != null && recordingOutputPath != null) { 102 if (recordingPath != null && recordingOutputPath != null) {
103 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" 103 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'"
104 "at the same time. Exiting ..."); 104 "at the same time. Exiting ...");
105 exit(1); 105 exit(1);
106 } 106 }
107 107
108 if (!hasSameModeAndArch(configurations)) { 108 if (!hasSameModeAndArch(configurations)) {
109 print("Persistent Fletch process doesn't support multiple " 109 print("Persistent Dartino process doesn't support multiple "
110 "arch and mode configurations"); 110 "arch and mode configurations");
111 exit(1); 111 exit(1);
112 } 112 }
113 113
114 if (!firstConf['append_logs']) { 114 if (!firstConf['append_logs']) {
115 var files = [new File(TestUtils.flakyFileName()), 115 var files = [new File(TestUtils.flakyFileName()),
116 new File(TestUtils.testOutcomeFileName())]; 116 new File(TestUtils.testOutcomeFileName())];
117 for (var file in files) { 117 for (var file in files) {
118 if (file.existsSync()) { 118 if (file.existsSync()) {
119 file.deleteSync(); 119 file.deleteSync();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 Platform.operatingSystem == 'macos') { 200 Platform.operatingSystem == 'macos') {
201 // Chrome on mac results in random timeouts. 201 // Chrome on mac results in random timeouts.
202 maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2); 202 maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2);
203 } 203 }
204 204
205 // If we specifically pass in a suite only run that. 205 // If we specifically pass in a suite only run that.
206 if (conf['suite_dir'] != null) { 206 if (conf['suite_dir'] != null) {
207 print(conf); 207 print(conf);
208 var suite_path = new Path(conf['suite_dir']); 208 var suite_path = new Path(conf['suite_dir']);
209 testSuites.add(new PKGTestSuite(conf, suite_path)); 209 testSuites.add(new PKGTestSuite(conf, suite_path));
210 } else if (conf['runtime'] == 'fletch_cc_tests') { 210 } else if (conf['runtime'] == 'dartino_cc_tests') {
211 for (final testSuiteDir in CC_TEST_SUITE_DIRECTORIES) { 211 for (final testSuiteDir in CC_TEST_SUITE_DIRECTORIES) {
212 final name = testSuiteDir.filename; 212 final name = testSuiteDir.filename;
213 if (selectors.containsKey(name)) { 213 if (selectors.containsKey(name)) {
214 testSuites.add( 214 testSuites.add(
215 new StandardTestSuite.forDirectory(conf, testSuiteDir)); 215 new StandardTestSuite.forDirectory(conf, testSuiteDir));
216 } 216 }
217 } 217 }
218 } else if (conf['runtime'] == 'fletch_warnings') { 218 } else if (conf['runtime'] == 'dartino_warnings') {
219 if (selectors.containsKey('warnings')) { 219 if (selectors.containsKey('warnings')) {
220 testSuites.add(new FletchWarningsSuite(conf, 'warnings')); 220 testSuites.add(new DartinoWarningsSuite(conf, 'warnings'));
221 } 221 }
222 } else if (conf['runtime'] == 'fletch_tests') { 222 } else if (conf['runtime'] == 'dartino_tests') {
223 if (selectors.containsKey('fletch_tests')) { 223 if (selectors.containsKey('dartino_tests')) {
224 testSuites.add(new FletchTestSuite(conf, 'tests/fletch_tests')); 224 testSuites.add(new DartinoTestSuite(conf, 'tests/dartino_tests'));
225 } 225 }
226 } else { 226 } else {
227 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { 227 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) {
228 final name = testSuiteDir.filename; 228 final name = testSuiteDir.filename;
229 if (selectors.containsKey(name)) { 229 if (selectors.containsKey(name)) {
230 testSuites.add( 230 testSuites.add(
231 new StandardTestSuite.forDirectory(conf, testSuiteDir)); 231 new StandardTestSuite.forDirectory(conf, testSuiteDir));
232 } 232 }
233 } 233 }
234 for (final testSuiteDir in DART_SDK_TEST_SUITE_DIRECTORIES) { 234 for (final testSuiteDir in DART_SDK_TEST_SUITE_DIRECTORIES) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 return result.stdout; 356 return result.stdout;
357 } 357 }
358 358
359 void killDriverMain() { 359 void killDriverMain() {
360 String processes = runChecked("/bin/ps", <String>["x", "-opid,args"]); 360 String processes = runChecked("/bin/ps", <String>["x", "-opid,args"]);
361 for (String process in processes.split("\n")) { 361 for (String process in processes.split("\n")) {
362 // It's important to remove white space as output from ps is padded with 362 // It's important to remove white space as output from ps is padded with
363 // whitespace. 363 // whitespace.
364 process = process.trim(); 364 process = process.trim();
365 if (process.contains("package:fletchc/src/hub/hub_main.dart")) { 365 if (process.contains("package:dartino_compiler/src/hub/hub_main.dart")) {
366 int index = process.indexOf(" "); 366 int index = process.indexOf(" ");
367 String pidString = process.substring(0, index); 367 String pidString = process.substring(0, index);
368 String arguments = process.substring(index + 1); 368 String arguments = process.substring(index + 1);
369 // TODO(ahe): Use [Process.killPid] instead. 369 // TODO(ahe): Use [Process.killPid] instead.
370 print("Killing $pidString: $arguments"); 370 print("Killing $pidString: $arguments");
371 print("Use --kill-persistent-process=0 to skip this step."); 371 print("Use --kill-persistent-process=0 to skip this step.");
372 runChecked("kill", <String>[pidString]); 372 runChecked("kill", <String>[pidString]);
373 } 373 }
374 } 374 }
375 } 375 }
(...skipping 16 matching lines...) Expand all
392 TestUtils.setDartDirUri(Platform.script.resolve('..')); 392 TestUtils.setDartDirUri(Platform.script.resolve('..'));
393 deleteTemporaryDartDirectories().then((_) { 393 deleteTemporaryDartDirectories().then((_) {
394 var optionsParser = new TestOptionsParser(); 394 var optionsParser = new TestOptionsParser();
395 var configurations = optionsParser.parse(arguments); 395 var configurations = optionsParser.parse(arguments);
396 if (configurations != null && configurations.length > 0) { 396 if (configurations != null && configurations.length > 0) {
397 testConfigurations(configurations); 397 testConfigurations(configurations);
398 } 398 }
399 }); 399 });
400 } 400 }
401 401
OLDNEW
« no previous file with comments | « tools/stm/one-stm-lib.sh ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698