mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:58:13 +00:00
[infra] Add support for app_jitk compiler to test.py (#33126)
* Add app_jitk configuration to test matrix. * Skip it on non-Dart 2 test suites. Change-Id: I05f75dbbd33d34a4acf4df1fe63104933d39d2fe Reviewed-on: https://dart-review.googlesource.com/56113 Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
640791c922
commit
d28c5499fc
|
@ -1777,5 +1777,5 @@ LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t02: CompileTimeError
|
|||
LibTest/typed_data/Uint64List/Uint64List.view_A01_t01: CompileTimeError
|
||||
LibTest/typed_data/Uint64List/Uint64List.view_A01_t02: CompileTimeError
|
||||
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
|
||||
*: SkipByDesign
|
||||
|
|
|
@ -299,8 +299,8 @@ package_resource_test: Skip # Resolve URI not supported yet in product mode.
|
|||
|
||||
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
|
||||
# modes are intended only for Dart 2.0 with strong mode enabled.
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
*: Skip
|
||||
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
|
||||
*: SkipByDesign
|
||||
|
||||
[ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ]
|
||||
big_integer_arith_vm_test: CompileTimeError # Large integer literal
|
||||
|
|
|
@ -195,5 +195,5 @@ unresolved_top_level_var_negative_test: Fail
|
|||
|
||||
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
|
||||
# modes are intended only for Dart 2.0 with strong mode enabled.
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
*: Skip
|
||||
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
|
||||
*: SkipByDesign
|
||||
|
|
|
@ -374,7 +374,7 @@ mirrors/symbol_validation_test: RuntimeError # Issue 13596
|
|||
|
||||
# All these tests have been migrated as strong mode compatible tests to
|
||||
# lib_2, so skipping these tests for dartk and dartkp
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
|
||||
*: SkipByDesign
|
||||
|
||||
[ $runtime == chrome || $runtime == ff ]
|
||||
|
|
|
@ -26,9 +26,6 @@ verbose_gc_to_bmu_test: Skip
|
|||
[ $builder_tag == swarming && $system == macos ]
|
||||
io/*: Skip # Issue 30618
|
||||
|
||||
[ $compiler == dartk && $strong ]
|
||||
*: SkipByDesign
|
||||
|
||||
[ $compiler == fasta && $strong ]
|
||||
io/directory_invalid_arguments_test: CompileTimeError
|
||||
io/io_override_test: CompileTimeError
|
||||
|
@ -68,19 +65,16 @@ io/process_invalid_arguments_test: Fail, OK # These tests have type errors on pu
|
|||
io/socket_invalid_arguments_test: Fail, OK # These tests have type errors on purpose.
|
||||
io/stdout_bad_argument_test: Fail, OK # These tests have type errors on purpose.
|
||||
|
||||
[ !$strong && ($compiler == dartk || $compiler == dartkp) ]
|
||||
*: Skip
|
||||
|
||||
[ $compiler == app_jit || $compiler == precompiler ]
|
||||
io/compile_all_test: Skip # Incompatible flag --compile_all
|
||||
|
||||
[ $compiler == dart2js || $compiler == dartdevc ]
|
||||
*: SkipByDesign
|
||||
|
||||
# We skip all the Dart 1.0 tests in dartk and dartkp mode as these
|
||||
# modes are intended only for Dart 2.0 with strong mode enabled.
|
||||
[ $compiler == dartk || $compiler == dartkp ]
|
||||
*: Skip
|
||||
[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkp ]
|
||||
*: SkipByDesign
|
||||
|
||||
[ $compiler == dart2js || $compiler == dartdevc ]
|
||||
*: SkipByDesign
|
||||
|
||||
[ $compiler != none || $runtime != vm ]
|
||||
script_snapshot_depfile_test: SkipByDesign # Only makes sense running from source.
|
||||
|
|
|
@ -434,6 +434,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"app-kernel-linux-debug-x64",
|
||||
"app-kernel-linux-product-x64",
|
||||
"app-kernel-linux-release-x64"
|
||||
],
|
||||
"meta": {
|
||||
"description": "This configuration is used by the vm kernel app builder group."
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build dart",
|
||||
"script": "tools/build.py",
|
||||
"arguments": [
|
||||
"runtime_kernel"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vm tests",
|
||||
"arguments": ["--compiler=app_jitk", "--strong"]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"ddc-linux-release-chrome",
|
||||
|
|
|
@ -68,6 +68,9 @@ abstract class CompilerConfiguration {
|
|||
case Compiler.appJit:
|
||||
return new AppJitCompilerConfiguration(configuration);
|
||||
|
||||
case Compiler.appJitk:
|
||||
return new AppJitCompilerConfiguration(configuration, useDfe: true);
|
||||
|
||||
case Compiler.precompiler:
|
||||
return new PrecompilerCompilerConfiguration(configuration);
|
||||
|
||||
|
@ -910,7 +913,11 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration
|
|||
}
|
||||
|
||||
class AppJitCompilerConfiguration extends CompilerConfiguration {
|
||||
AppJitCompilerConfiguration(Configuration configuration)
|
||||
// This boolean is used by the [VMTestSuite] for running cc tests via
|
||||
// run_vm_tests.
|
||||
final bool useDfe;
|
||||
|
||||
AppJitCompilerConfiguration(Configuration configuration, {this.useDfe: false})
|
||||
: super._subclass(configuration);
|
||||
|
||||
int get timeoutMultiplier {
|
||||
|
@ -934,6 +941,9 @@ class AppJitCompilerConfiguration extends CompilerConfiguration {
|
|||
var exec = "${_configuration.buildDirectory}/dart";
|
||||
var snapshot = "$tempDir/out.jitsnapshot";
|
||||
var args = ["--snapshot=$snapshot", "--snapshot-kind=app-jit"];
|
||||
if (useDfe) {
|
||||
args.add("--preview-dart-2");
|
||||
}
|
||||
args.addAll(arguments);
|
||||
|
||||
return Command.compilation('app_jit', tempDir, bootstrapDependencies(),
|
||||
|
@ -966,6 +976,9 @@ class AppJitCompilerConfiguration extends CompilerConfiguration {
|
|||
args.add('--enable_asserts');
|
||||
args.add('--enable_type_checks');
|
||||
}
|
||||
if (useDfe) {
|
||||
args.add('--preview-dart-2');
|
||||
}
|
||||
args
|
||||
..addAll(vmOptions)
|
||||
..addAll(sharedOptions)
|
||||
|
|
|
@ -187,6 +187,7 @@ class Configuration {
|
|||
/// as the first stage of compilation.
|
||||
bool get usesFasta {
|
||||
var fastaCompilers = const [
|
||||
Compiler.appJitk,
|
||||
Compiler.dartdevk,
|
||||
Compiler.dartk,
|
||||
Compiler.dartkp,
|
||||
|
@ -546,6 +547,7 @@ class Compiler {
|
|||
static const dartdevc = const Compiler._('dartdevc');
|
||||
static const dartdevk = const Compiler._('dartdevk');
|
||||
static const appJit = const Compiler._('app_jit');
|
||||
static const appJitk = const Compiler._('app_jitk');
|
||||
static const dartk = const Compiler._('dartk');
|
||||
static const dartkp = const Compiler._('dartkp');
|
||||
static const specParser = const Compiler._('spec_parser');
|
||||
|
@ -561,6 +563,7 @@ class Compiler {
|
|||
dartdevc,
|
||||
dartdevk,
|
||||
appJit,
|
||||
appJitk,
|
||||
dartk,
|
||||
dartkp,
|
||||
specParser,
|
||||
|
@ -614,6 +617,7 @@ class Compiler {
|
|||
case Compiler.dart2analyzer:
|
||||
return const [Runtime.none];
|
||||
case Compiler.appJit:
|
||||
case Compiler.appJitk:
|
||||
case Compiler.dartk:
|
||||
return const [Runtime.vm, Runtime.selfCheck];
|
||||
case Compiler.precompiler:
|
||||
|
@ -647,6 +651,7 @@ class Compiler {
|
|||
case Compiler.dart2analyzer:
|
||||
return Runtime.none;
|
||||
case Compiler.appJit:
|
||||
case Compiler.appJitk:
|
||||
case Compiler.dartk:
|
||||
return Runtime.vm;
|
||||
case Compiler.precompiler:
|
||||
|
@ -805,6 +810,7 @@ class Runtime {
|
|||
].contains(this);
|
||||
|
||||
bool get isIE => name.startsWith("ie");
|
||||
|
||||
bool get isSafari => name.startsWith("safari");
|
||||
|
||||
/// Whether this runtime is a command-line JavaScript environment.
|
||||
|
|
|
@ -96,6 +96,7 @@ precompiler: Compile into AOT snapshot before running the test.
|
|||
dart2js: Compile to JavaScript using dart2js.
|
||||
dart2analyzer: Perform static analysis on Dart code using the analyzer.
|
||||
app_jit: Compile the Dart code into an app snapshot.
|
||||
app_jitk: Compile the Dart code into Kernel and then into an app snapshot.
|
||||
dartk: Compile the Dart code into Kernel before running test.
|
||||
dartkp: Compile the Dart code into Kernel and then Kernel into AOT
|
||||
snapshot before running the test.
|
||||
|
|
Loading…
Reference in a new issue