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

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

Issue 2914893003: Revert "Replace the configuration map with a typed object." (Closed)
Patch Set: 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/co19_test_config.dart ('k') | tools/testing/dart/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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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:io'; 5 library compiler_configuration;
6 6
7 import 'configuration.dart'; 7 import 'dart:io' show Platform;
8 import 'runtime_configuration.dart'; 8
9 import 'test_runner.dart'; 9 import 'runtime_configuration.dart' show RuntimeConfiguration;
10 import 'test_suite.dart'; 10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration;
11 import 'test_runner.dart' show Command, CommandBuilder, CompilationCommand;
12 import 'test_suite.dart' show TestInformation, TestUtils;
11 13
12 List<String> replaceDartFileWith(List<String> list, String replacement) { 14 List<String> replaceDartFileWith(List<String> list, String replacement) {
13 var copy = new List<String>.from(list); 15 var copy = new List<String>.from(list);
14 for (var i = 0; i < copy.length; i++) { 16 for (var i = 0; i < copy.length; i++) {
15 if (copy[i].endsWith(".dart")) { 17 if (copy[i].endsWith(".dart")) {
16 copy[i] = replacement; 18 copy[i] = replacement;
17 } 19 }
18 } 20 }
19 return copy; 21 return copy;
20 } 22 }
(...skipping 23 matching lines...) Expand all
44 final bool isStrong; 46 final bool isStrong;
45 final bool isHostChecked; 47 final bool isHostChecked;
46 final bool useSdk; 48 final bool useSdk;
47 49
48 /// Only some subclasses support this check, but we statically allow calling 50 /// Only some subclasses support this check, but we statically allow calling
49 /// it on [CompilerConfiguration]. 51 /// it on [CompilerConfiguration].
50 bool get useDfe { 52 bool get useDfe {
51 throw new UnsupportedError("This compiler does not support DFE."); 53 throw new UnsupportedError("This compiler does not support DFE.");
52 } 54 }
53 55
54 factory CompilerConfiguration(Configuration configuration) { 56 // TODO(ahe): Remove this constructor and move the switch to
55 switch (configuration.compiler) { 57 // test_options.dart. We probably want to store an instance of
56 case Compiler.dart2analyzer: 58 // [CompilerConfiguration] in [configuration] there.
59 factory CompilerConfiguration(Map<String, dynamic> configuration) {
60 var compiler = configuration['compiler'] as String;
61
62 // TODO(ahe): Move these booleans into a struction configuration object
63 // which can eventually completely replace the Map-based configuration
64 // object.
65 var isDebug = (configuration['mode'] as String) == 'debug';
66 var isChecked = configuration['checked'] as bool;
67 var isStrong = configuration['strong'] as bool;
68 var isHostChecked = configuration['host_checked'] as bool;
69 var useSdk = configuration['use_sdk'] as bool;
70 var isCsp = configuration['csp'] as bool;
71 var useBlobs = configuration['use_blobs'] as bool;
72 var hotReload = configuration['hot_reload'] as bool;
73 var hotReloadRollback = configuration['hot_reload_rollback'] as bool;
74 var useFastStartup = configuration['fast_startup'] as bool;
75 var useKernelInDart2js = configuration['dart2js_with_kernel'] as bool;
76
77 switch (compiler) {
78 case 'dart2analyzer':
57 return new AnalyzerCompilerConfiguration( 79 return new AnalyzerCompilerConfiguration(
58 isDebug: configuration.mode.isDebug, 80 isDebug: isDebug,
59 isChecked: configuration.isChecked, 81 isChecked: isChecked,
60 isStrong: configuration.isStrong, 82 isStrong: isStrong,
61 isHostChecked: configuration.isHostChecked, 83 isHostChecked: isHostChecked,
62 useSdk: configuration.useSdk); 84 useSdk: useSdk);
63 85 case 'dart2js':
64 case Compiler.dart2js:
65 return new Dart2jsCompilerConfiguration( 86 return new Dart2jsCompilerConfiguration(
66 isDebug: configuration.mode.isDebug, 87 isDebug: isDebug,
67 isChecked: configuration.isChecked, 88 isChecked: isChecked,
68 isHostChecked: configuration.isHostChecked, 89 isHostChecked: isHostChecked,
69 useSdk: configuration.useSdk, 90 useSdk: useSdk,
70 isCsp: configuration.isCsp, 91 isCsp: isCsp,
71 useFastStartup: configuration.useFastStartup, 92 useFastStartup: useFastStartup,
72 useKernel: configuration.useDart2JSWithKernel, 93 useKernel: useKernelInDart2js,
73 extraDart2jsOptions: configuration.dart2jsOptions); 94 extraDart2jsOptions:
74 95 TestUtils.getExtraOptions(configuration, 'dart2js_options'));
75 case Compiler.appJit: 96 case 'app_jit':
76 return new AppJitCompilerConfiguration( 97 return new AppJitCompilerConfiguration(
77 isDebug: configuration.mode.isDebug, 98 isDebug: isDebug, isChecked: isChecked);
78 isChecked: configuration.isChecked); 99 case 'precompiler':
79
80 case Compiler.precompiler:
81 return new PrecompilerCompilerConfiguration( 100 return new PrecompilerCompilerConfiguration(
82 isDebug: configuration.mode.isDebug, 101 isDebug: isDebug,
83 isChecked: configuration.isChecked, 102 isChecked: isChecked,
84 arch: configuration.architecture, 103 arch: configuration['arch'] as String,
85 useBlobs: configuration.useBlobs, 104 useBlobs: useBlobs,
86 isAndroid: configuration.system == System.android); 105 isAndroid: configuration['system'] == 'android');
87 106 case 'dartk':
88 case Compiler.dartk:
89 return new NoneCompilerConfiguration( 107 return new NoneCompilerConfiguration(
90 isDebug: configuration.mode.isDebug, 108 isDebug: isDebug,
91 isChecked: configuration.isChecked, 109 isChecked: isChecked,
92 isHostChecked: configuration.isHostChecked, 110 isHostChecked: isHostChecked,
93 useSdk: configuration.useSdk, 111 useSdk: useSdk,
94 hotReload: configuration.hotReload, 112 hotReload: hotReload,
95 hotReloadRollback: configuration.hotReloadRollback, 113 hotReloadRollback: hotReloadRollback,
96 useDfe: true); 114 useDfe: true);
97 115 case 'dartkp':
98 case Compiler.dartkp:
99 return new PrecompilerCompilerConfiguration( 116 return new PrecompilerCompilerConfiguration(
100 isDebug: configuration.mode.isDebug, 117 isDebug: isDebug,
101 isChecked: configuration.isChecked, 118 isChecked: isChecked,
102 arch: configuration.architecture, 119 arch: configuration['arch'] as String,
103 useBlobs: configuration.useBlobs, 120 useBlobs: useBlobs,
104 isAndroid: configuration.system == System.android, 121 isAndroid: configuration['system'] == 'android',
105 useDfe: true); 122 useDfe: true);
106 123 case 'none':
107 case Compiler.none:
108 return new NoneCompilerConfiguration( 124 return new NoneCompilerConfiguration(
109 isDebug: configuration.mode.isDebug, 125 isDebug: isDebug,
110 isChecked: configuration.isChecked, 126 isChecked: isChecked,
111 isHostChecked: configuration.isHostChecked, 127 isHostChecked: isHostChecked,
112 useSdk: configuration.useSdk, 128 useSdk: useSdk,
113 hotReload: configuration.hotReload, 129 hotReload: hotReload,
114 hotReloadRollback: configuration.hotReloadRollback); 130 hotReloadRollback: hotReloadRollback);
131 default:
132 throw "Unknown compiler '$compiler'";
115 } 133 }
116
117 throw "unreachable";
118 } 134 }
119 135
120 CompilerConfiguration._subclass( 136 CompilerConfiguration._subclass(
121 {this.isDebug: false, 137 {this.isDebug: false,
122 this.isChecked: false, 138 this.isChecked: false,
123 this.isStrong: false, 139 this.isStrong: false,
124 this.isHostChecked: false, 140 this.isHostChecked: false,
125 this.useSdk: false}); 141 this.useSdk: false});
126 142
127 /// A multiplier used to give tests longer time to run. 143 /// Return a multiplier used to give tests longer time to run.
128 int get timeoutMultiplier => 1; 144 // TODO(ahe): Convert to getter!
145 int computeTimeoutMultiplier() {
146 return 1;
147 }
129 148
130 // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these 149 // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these
131 // functions. It is fixed for a given configuration. 150 // functions. It is fixed for a given configuration.
132 String computeCompilerPath(String buildDir) { 151 String computeCompilerPath(String buildDir) {
133 throw "Unknown compiler for: $runtimeType"; 152 throw "Unknown compiler for: $runtimeType";
134 } 153 }
135 154
136 bool get hasCompiler => true; 155 bool get hasCompiler => true;
137 156
138 String get executableScriptSuffix => Platform.isWindows ? '.bat' : ''; 157 String get executableScriptSuffix => Platform.isWindows ? '.bat' : '';
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 info, 423 info,
405 vmOptions, 424 vmOptions,
406 sharedOptions, 425 sharedOptions,
407 originalArguments, 426 originalArguments,
408 artifact); 427 artifact);
409 } 428 }
410 429
411 static ComposedCompilerConfiguration createDartKPConfiguration( 430 static ComposedCompilerConfiguration createDartKPConfiguration(
412 {bool isChecked, 431 {bool isChecked,
413 bool isHostChecked, 432 bool isHostChecked,
414 Architecture arch, 433 String arch,
415 bool useBlobs, 434 bool useBlobs,
416 bool isAndroid, 435 bool isAndroid,
417 bool useSdk, 436 bool useSdk,
418 bool verify, 437 bool verify,
419 bool strong, 438 bool strong,
420 bool treeShake}) { 439 bool treeShake}) {
421 return new ComposedCompilerConfiguration([ 440 return new ComposedCompilerConfiguration([
422 // Compile with dartk. 441 // Compile with dartk.
423 new PipelineCommand.runWithGlobalArguments(new DartKCompilerConfiguration( 442 new PipelineCommand.runWithGlobalArguments(new DartKCompilerConfiguration(
424 isChecked: isChecked, 443 isChecked: isChecked,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 bool this.isCsp, 553 bool this.isCsp,
535 bool this.useFastStartup, 554 bool this.useFastStartup,
536 this.useKernel, 555 this.useKernel,
537 this.extraDart2jsOptions}) 556 this.extraDart2jsOptions})
538 : super('dart2js', 557 : super('dart2js',
539 isDebug: isDebug, 558 isDebug: isDebug,
540 isChecked: isChecked, 559 isChecked: isChecked,
541 isHostChecked: isHostChecked, 560 isHostChecked: isHostChecked,
542 useSdk: useSdk); 561 useSdk: useSdk);
543 562
544 int get timeoutMultiplier { 563 int computeTimeoutMultiplier() {
545 var multiplier = 1; 564 int multiplier = 1;
546 if (isDebug) multiplier *= 4; 565 if (isDebug) multiplier *= 4;
547 if (isChecked) multiplier *= 2; 566 if (isChecked) multiplier *= 2;
548 if (isHostChecked) multiplier *= 16; 567 if (isHostChecked) multiplier *= 16;
549 return multiplier; 568 return multiplier;
550 } 569 }
551 570
552 CommandArtifact computeCompilationArtifact( 571 CommandArtifact computeCompilationArtifact(
553 String buildDir, 572 String buildDir,
554 String tempDir, 573 String tempDir,
555 CommandBuilder commandBuilder, 574 CommandBuilder commandBuilder,
(...skipping 18 matching lines...) Expand all
574 ? nativeDirectoryToUri(buildDir).resolve('dart-sdk/') 593 ? nativeDirectoryToUri(buildDir).resolve('dart-sdk/')
575 : nativeDirectoryToUri(TestUtils.dartDir.toNativePath()) 594 : nativeDirectoryToUri(TestUtils.dartDir.toNativePath())
576 .resolve('sdk/'); 595 .resolve('sdk/');
577 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/'); 596 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/');
578 return runtimeConfiguration.dart2jsPreambles(preambleDir) 597 return runtimeConfiguration.dart2jsPreambles(preambleDir)
579 ..add(artifact.filename); 598 ..add(artifact.filename);
580 } 599 }
581 } 600 }
582 601
583 class PrecompilerCompilerConfiguration extends CompilerConfiguration { 602 class PrecompilerCompilerConfiguration extends CompilerConfiguration {
584 final Architecture arch; 603 final String arch;
585 final bool useBlobs; 604 final bool useBlobs;
586 final bool isAndroid; 605 final bool isAndroid;
587 final bool useDfe; 606 final bool useDfe;
588 607
589 PrecompilerCompilerConfiguration( 608 PrecompilerCompilerConfiguration(
590 {bool isDebug, 609 {bool isDebug,
591 bool isChecked, 610 bool isChecked,
592 this.arch, 611 this.arch,
593 this.useBlobs, 612 this.useBlobs,
594 this.isAndroid, 613 this.isAndroid,
595 this.useDfe: false}) 614 this.useDfe: false})
596 : super._subclass(isDebug: isDebug, isChecked: isChecked); 615 : super._subclass(isDebug: isDebug, isChecked: isChecked);
597 616
598 int get timeoutMultiplier { 617 int computeTimeoutMultiplier() {
599 var multiplier = 2; 618 int multiplier = 2;
600 if (isDebug) multiplier *= 4; 619 if (isDebug) multiplier *= 4;
601 if (isChecked) multiplier *= 2; 620 if (isChecked) multiplier *= 2;
602 return multiplier; 621 return multiplier;
603 } 622 }
604 623
605 CommandArtifact computeCompilationArtifact( 624 CommandArtifact computeCompilationArtifact(
606 String buildDir, 625 String buildDir,
607 String tempDir, 626 String tempDir,
608 CommandBuilder commandBuilder, 627 CommandBuilder commandBuilder,
609 List<String> arguments, 628 List<String> arguments,
(...skipping 12 matching lines...) Expand all
622 } 641 }
623 642
624 CompilationCommand computeCompilationCommand( 643 CompilationCommand computeCompilationCommand(
625 String tempDir, 644 String tempDir,
626 String buildDir, 645 String buildDir,
627 CommandBuilder commandBuilder, 646 CommandBuilder commandBuilder,
628 List<String> arguments, 647 List<String> arguments,
629 Map<String, String> environmentOverrides) { 648 Map<String, String> environmentOverrides) {
630 String exec; 649 String exec;
631 if (isAndroid) { 650 if (isAndroid) {
632 if (arch == Architecture.arm) { 651 if (arch == "arm") {
633 exec = "$buildDir/clang_x86/dart_bootstrap"; 652 exec = "$buildDir/clang_x86/dart_bootstrap";
634 } else if (arch == Architecture.arm64) { 653 } else if (arch == "arm64") {
635 exec = "$buildDir/clang_x64/dart_bootstrap"; 654 exec = "$buildDir/clang_x64/dart_bootstrap";
636 } 655 }
637 } else { 656 } else {
638 exec = "$buildDir/dart_bootstrap"; 657 exec = "$buildDir/dart_bootstrap";
639 } 658 }
640 var args = <String>[]; 659 var args = <String>[];
641 if (useDfe) { 660 if (useDfe) {
642 args.add('--dfe=utils/kernel-service/kernel-service.dart'); 661 args.add('--dfe=utils/kernel-service/kernel-service.dart');
643 args.add('--platform=${buildDir}/patched_sdk/platform.dill'); 662 args.add('--platform=${buildDir}/patched_sdk/platform.dill');
644 } 663 }
645 args.add("--snapshot-kind=app-aot"); 664 args.add("--snapshot-kind=app-aot");
646 if (useBlobs) { 665 if (useBlobs) {
647 args.add("--snapshot=$tempDir/out.aotsnapshot"); 666 args.add("--snapshot=$tempDir/out.aotsnapshot");
648 args.add("--use-blobs"); 667 args.add("--use-blobs");
649 } else { 668 } else {
650 args.add("--snapshot=$tempDir/out.S"); 669 args.add("--snapshot=$tempDir/out.S");
651 } 670 }
652 if (isAndroid && arch == Architecture.arm) { 671 if (isAndroid && arch == 'arm') {
653 args.add('--no-sim-use-hardfp'); 672 args.add('--no-sim-use-hardfp');
654 } 673 }
655 args.addAll(arguments); 674 args.addAll(arguments);
656 675
657 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk, 676 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk,
658 bootstrapDependencies(buildDir), exec, args, environmentOverrides); 677 bootstrapDependencies(buildDir), exec, args, environmentOverrides);
659 } 678 }
660 679
661 CompilationCommand computeAssembleCommand( 680 CompilationCommand computeAssembleCommand(
662 String tempDir, 681 String tempDir,
663 String buildDir, 682 String buildDir,
664 CommandBuilder commandBuilder, 683 CommandBuilder commandBuilder,
665 List arguments, 684 List arguments,
666 Map<String, String> environmentOverrides) { 685 Map<String, String> environmentOverrides) {
667 String cc, shared, ldFlags; 686 String cc, shared, ld_flags;
668 if (isAndroid) { 687 if (isAndroid) {
669 var ndk = "third_party/android_tools/ndk"; 688 var ndk = "third_party/android_tools/ndk";
670 String triple; 689 String triple;
671 if (arch == Architecture.arm) { 690 if (arch == "arm") {
672 triple = "arm-linux-androideabi"; 691 triple = "arm-linux-androideabi";
673 } else if (arch == Architecture.arm64) { 692 } else if (arch == "arm64") {
674 triple = "aarch64-linux-android"; 693 triple = "aarch64-linux-android";
675 } 694 }
676 String host; 695 String host;
677 if (Platform.isLinux) { 696 if (Platform.isLinux) {
678 host = "linux"; 697 host = "linux";
679 } else if (Platform.isMacOS) { 698 } else if (Platform.isMacOS) {
680 host = "darwin"; 699 host = "darwin";
681 } 700 }
682 cc = "$ndk/toolchains/$triple-4.9/prebuilt/$host-x86_64/bin/$triple-gcc"; 701 cc = "$ndk/toolchains/$triple-4.9/prebuilt/$host-x86_64/bin/$triple-gcc";
683 shared = '-shared'; 702 shared = '-shared';
684 } else if (Platform.isLinux) { 703 } else if (Platform.isLinux) {
685 cc = 'gcc'; 704 cc = 'gcc';
686 shared = '-shared'; 705 shared = '-shared';
687 } else if (Platform.isMacOS) { 706 } else if (Platform.isMacOS) {
688 cc = 'clang'; 707 cc = 'clang';
689 shared = '-dynamiclib'; 708 shared = '-dynamiclib';
690 // Tell Mac linker to give up generating eh_frame from dwarf. 709 // Tell Mac linker to give up generating eh_frame from dwarf.
691 ldFlags = '-Wl,-no_compact_unwind'; 710 ld_flags = '-Wl,-no_compact_unwind';
692 } else { 711 } else {
693 throw "Platform not supported: ${Platform.operatingSystem}"; 712 throw "Platform not supported: ${Platform.operatingSystem}";
694 } 713 }
695 714
696 String ccFlags; 715 String cc_flags;
697 switch (arch) { 716 if (arch == 'x64') {
698 case Architecture.x64: 717 cc_flags = "-m64";
699 case Architecture.simarm64: 718 } else if (arch == 'simarm64') {
700 ccFlags = "-m64"; 719 cc_flags = "-m64";
701 break; 720 } else if (arch == 'ia32') {
702 case Architecture.ia32: 721 cc_flags = "-m32";
703 case Architecture.simarm: 722 } else if (arch == 'simarm') {
704 case Architecture.simmips: 723 cc_flags = "-m32";
705 ccFlags = "-m32"; 724 } else if (arch == 'simmips') {
706 break; 725 cc_flags = "-m32";
707 case Architecture.arm: 726 } else if (arch == 'arm') {
708 case Architecture.arm64: 727 cc_flags = null;
709 ccFlags = null; 728 } else if (arch == 'arm64') {
710 break; 729 cc_flags = null;
711 case Architecture.mips: 730 } else if (arch == 'mips') {
712 ccFlags = "-EL"; 731 cc_flags = "-EL";
713 break; 732 } else {
714 default: 733 throw "Architecture not supported: $arch";
715 throw "Architecture not supported: ${arch.name}";
716 } 734 }
717 735
718 var exec = cc; 736 var exec = cc;
719 var args = <String>[]; 737 var args = <String>[];
720 if (ccFlags != null) args.add(ccFlags); 738 if (cc_flags != null) args.add(cc_flags);
721 if (ldFlags != null) args.add(ldFlags); 739 if (ld_flags != null) args.add(ld_flags);
722 args.add(shared); 740 args.add(shared);
723 args.add('-nostdlib'); 741 args.add('-nostdlib');
724 args.add('-o'); 742 args.add('-o');
725 args.add('$tempDir/out.aotsnapshot'); 743 args.add('$tempDir/out.aotsnapshot');
726 args.add('$tempDir/out.S'); 744 args.add('$tempDir/out.S');
727 745
728 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk, 746 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk,
729 bootstrapDependencies(buildDir), exec, args, environmentOverrides); 747 bootstrapDependencies(buildDir), exec, args, environmentOverrides);
730 } 748 }
731 749
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 ..addAll(vmOptions) 817 ..addAll(vmOptions)
800 ..addAll(sharedOptions) 818 ..addAll(sharedOptions)
801 ..addAll(originalArguments); 819 ..addAll(originalArguments);
802 } 820 }
803 } 821 }
804 822
805 class AppJitCompilerConfiguration extends CompilerConfiguration { 823 class AppJitCompilerConfiguration extends CompilerConfiguration {
806 AppJitCompilerConfiguration({bool isDebug, bool isChecked}) 824 AppJitCompilerConfiguration({bool isDebug, bool isChecked})
807 : super._subclass(isDebug: isDebug, isChecked: isChecked); 825 : super._subclass(isDebug: isDebug, isChecked: isChecked);
808 826
809 int get timeoutMultiplier { 827 int computeTimeoutMultiplier() {
810 var multiplier = 1; 828 int multiplier = 1;
811 if (isDebug) multiplier *= 2; 829 if (isDebug) multiplier *= 2;
812 if (isChecked) multiplier *= 2; 830 if (isChecked) multiplier *= 2;
813 return multiplier; 831 return multiplier;
814 } 832 }
815 833
816 CommandArtifact computeCompilationArtifact( 834 CommandArtifact computeCompilationArtifact(
817 String buildDir, 835 String buildDir,
818 String tempDir, 836 String tempDir,
819 CommandBuilder commandBuilder, 837 CommandBuilder commandBuilder,
820 List<String> arguments, 838 List<String> arguments,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 bool isStrong, 902 bool isStrong,
885 bool isHostChecked, 903 bool isHostChecked,
886 bool useSdk}) 904 bool useSdk})
887 : super._subclass( 905 : super._subclass(
888 isDebug: isDebug, 906 isDebug: isDebug,
889 isChecked: isChecked, 907 isChecked: isChecked,
890 isStrong: isStrong, 908 isStrong: isStrong,
891 isHostChecked: isHostChecked, 909 isHostChecked: isHostChecked,
892 useSdk: useSdk); 910 useSdk: useSdk);
893 911
894 int get timeoutMultiplier => 4; 912 int computeTimeoutMultiplier() {
913 return 4;
914 }
895 915
896 String computeCompilerPath(String buildDir) { 916 String computeCompilerPath(String buildDir) {
897 var prefix = 'sdk/bin'; 917 var prefix = 'sdk/bin';
898 String suffix = executableScriptSuffix; 918 String suffix = executableScriptSuffix;
899 if (isHostChecked) { 919 if (isHostChecked) {
900 if (useSdk) { 920 if (useSdk) {
901 throw "--host-checked and --use-sdk cannot be used together"; 921 throw "--host-checked and --use-sdk cannot be used together";
902 } 922 }
903 // The script dartanalyzer_developer is not included in the 923 // The script dartanalyzer_developer is not included in the
904 // shipped SDK, that is the script is not installed in 924 // shipped SDK, that is the script is not installed in
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 RuntimeConfiguration runtimeConfiguration, 956 RuntimeConfiguration runtimeConfiguration,
937 String buildDir, 957 String buildDir,
938 TestInformation info, 958 TestInformation info,
939 List<String> vmOptions, 959 List<String> vmOptions,
940 List<String> sharedOptions, 960 List<String> sharedOptions,
941 List<String> originalArguments, 961 List<String> originalArguments,
942 CommandArtifact artifact) { 962 CommandArtifact artifact) {
943 return <String>[]; 963 return <String>[];
944 } 964 }
945 } 965 }
OLDNEW
« no previous file with comments | « tools/testing/dart/co19_test_config.dart ('k') | tools/testing/dart/configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698