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

Side by Side Diff: tools/testing/dart/configuration.dart

Issue 2947473002: Basic support for dev_compiler in test.dart. (Closed)
Patch Set: Revise. Created 3 years, 6 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/testing/dart/compiler_configuration.dart ('k') | tools/testing/dart/test_runner.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 // 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'compiler_configuration.dart'; 9 import 'compiler_configuration.dart';
10 import 'http_server.dart'; 10 import 'http_server.dart';
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 print("-rflutter requires the flutter engine executable to " 354 print("-rflutter requires the flutter engine executable to "
355 "be specified using --flutter"); 355 "be specified using --flutter");
356 isValid = false; 356 isValid = false;
357 } 357 }
358 358
359 if (runtime == Runtime.flutter && architecture != Architecture.x64) { 359 if (runtime == Runtime.flutter && architecture != Architecture.x64) {
360 isValid = false; 360 isValid = false;
361 print("-rflutter is applicable only for --arch=x64"); 361 print("-rflutter is applicable only for --arch=x64");
362 } 362 }
363 363
364 if (compiler == Compiler.dartdevc && !useSdk) {
365 isValid = false;
366 print("--compiler dartdevc requires --use-sdk");
367 }
368
369 if (compiler == Compiler.dartdevc && !isStrong) {
370 isValid = false;
371 print("--compiler dartdevc requires --strong");
372 }
373
364 return isValid; 374 return isValid;
365 } 375 }
366 376
367 /// Starts global HTTP servers that serve the entire dart repo. 377 /// Starts global HTTP servers that serve the entire dart repo.
368 /// 378 ///
369 /// The HTTP server is available on `window.location.port`, and a second 379 /// The HTTP server is available on `window.location.port`, and a second
370 /// server for cross-domain tests can be found by calling 380 /// server for cross-domain tests can be found by calling
371 /// `getCrossOriginPortNumber()`. 381 /// `getCrossOriginPortNumber()`.
372 Future startServers() { 382 Future startServers() {
373 _servers = new TestingServers( 383 _servers = new TestingServers(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 const Architecture._(this.name); 479 const Architecture._(this.name);
470 480
471 String toString() => "Architecture($name)"; 481 String toString() => "Architecture($name)";
472 } 482 }
473 483
474 class Compiler { 484 class Compiler {
475 static const none = const Compiler._('none'); 485 static const none = const Compiler._('none');
476 static const precompiler = const Compiler._('precompiler'); 486 static const precompiler = const Compiler._('precompiler');
477 static const dart2js = const Compiler._('dart2js'); 487 static const dart2js = const Compiler._('dart2js');
478 static const dart2analyzer = const Compiler._('dart2analyzer'); 488 static const dart2analyzer = const Compiler._('dart2analyzer');
489 static const dartdevc = const Compiler._('dartdevc');
479 static const appJit = const Compiler._('app_jit'); 490 static const appJit = const Compiler._('app_jit');
480 static const dartk = const Compiler._('dartk'); 491 static const dartk = const Compiler._('dartk');
481 static const dartkp = const Compiler._('dartkp'); 492 static const dartkp = const Compiler._('dartkp');
482 493
483 static final List<String> names = _all.keys.toList(); 494 static final List<String> names = _all.keys.toList();
484 495
485 static final _all = new Map<String, Compiler>.fromIterable( 496 static final _all = new Map<String, Compiler>.fromIterable([
486 [none, precompiler, dart2js, dart2analyzer, appJit, dartk, dartkp], 497 none,
487 key: (Compiler compiler) => compiler.name); 498 precompiler,
499 dart2js,
500 dart2analyzer,
501 dartdevc,
502 appJit,
503 dartk,
504 dartkp
505 ], key: (Compiler compiler) => compiler.name);
488 506
489 static Compiler find(String name) { 507 static Compiler find(String name) {
490 var compiler = _all[name]; 508 var compiler = _all[name];
491 if (compiler != null) return compiler; 509 if (compiler != null) return compiler;
492 510
493 throw new ArgumentError('Unknown compiler "$name".'); 511 throw new ArgumentError('Unknown compiler "$name".');
494 } 512 }
495 513
496 final String name; 514 final String name;
497 515
(...skipping 17 matching lines...) Expand all
515 Runtime.chrome, 533 Runtime.chrome,
516 Runtime.safari, 534 Runtime.safari,
517 Runtime.ie9, 535 Runtime.ie9,
518 Runtime.ie10, 536 Runtime.ie10,
519 Runtime.ie11, 537 Runtime.ie11,
520 Runtime.opera, 538 Runtime.opera,
521 Runtime.chromeOnAndroid, 539 Runtime.chromeOnAndroid,
522 Runtime.safariMobileSim 540 Runtime.safariMobileSim
523 ]; 541 ];
524 542
543 case Compiler.dart2js:
544 case Compiler.dartdevc:
545 // TODO(rnystrom): Expand to support other JS execution environments
546 // (other browsers, d8) when tested and working.
547 return const [
548 Runtime.none,
549 Runtime.chrome,
550 ];
551
525 case Compiler.dart2analyzer: 552 case Compiler.dart2analyzer:
526 return const [Runtime.none]; 553 return const [Runtime.none];
527 case Compiler.appJit: 554 case Compiler.appJit:
528 case Compiler.dartk: 555 case Compiler.dartk:
529 return const [Runtime.vm, Runtime.selfCheck]; 556 return const [Runtime.vm, Runtime.selfCheck];
530 case Compiler.precompiler: 557 case Compiler.precompiler:
531 case Compiler.dartkp: 558 case Compiler.dartkp:
532 return const [Runtime.dartPrecompiled]; 559 return const [Runtime.dartPrecompiled];
533 case Compiler.none: 560 case Compiler.none:
534 return const [ 561 return const [
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 755
729 case macos: 756 case macos:
730 return 'xcodebuild/'; 757 return 'xcodebuild/';
731 } 758 }
732 759
733 throw "unreachable"; 760 throw "unreachable";
734 } 761 }
735 762
736 String toString() => "System($name)"; 763 String toString() => "System($name)";
737 } 764 }
OLDNEW
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698