[test_runner] Support for arm32 VM in JIT mode on x64 via QEMU

Using QEMU in AOT mode is still pending.

Issue: https://github.com/dart-lang/sdk/issues/40337

Change-Id: Idf68f5420eee91048eeca01534954f26ddba11ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133231
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes
2020-01-28 08:44:07 +00:00
committed by commit-bot@chromium.org
parent 59e8068169
commit 62291efcfd
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -68,7 +68,8 @@ class TestConfiguration {
this.outputDirectory,
this.reproducingArguments,
this.fastTestsOnly,
this.printPassingStdout})
this.printPassingStdout,
this.useQemu})
: _packages = packages;
final Map<String, RegExp> selectors;
@@ -97,6 +98,7 @@ class TestConfiguration {
final bool writeResults;
final bool writeLogs;
final bool printPassingStdout;
final bool useQemu;
Architecture get architecture => configuration.architecture;
Compiler get compiler => configuration.compiler;
+4 -1
View File
@@ -188,6 +188,8 @@ test options, specifying how tests should be run.''',
_Option.bool('use_elf',
'Directly generate an ELF shared libraries for precompilation.',
hide: true),
_Option.bool('use_qemu', 'Use qemu to test arm32 on x64 host machines.',
hide: true),
_Option.bool('keep_generated_files', 'Keep any generated files.',
abbr: 'k'),
_Option.int('timeout', 'Timeout in seconds.', abbr: 't'),
@@ -749,7 +751,8 @@ compiler.''',
reproducingArguments:
_reproducingCommand(data, namedConfiguration != null),
fastTestsOnly: data["fast_tests"] as bool,
printPassingStdout: data["print_passing_stdout"] as bool);
printPassingStdout: data["print_passing_stdout"] as bool,
useQemu: data["use_qemu"] as bool);
if (configuration.validate()) {
result.add(configuration);
@@ -273,6 +273,10 @@ class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
if (type == 'application/kernel-ir-fully-linked') {
executable = dartVmExecutableFileName;
}
if (_configuration.useQemu) {
arguments.insertAll(0, ['-L', '/usr/arm-linux-gnueabihf/', executable]);
executable = 'qemu-arm';
}
return [VMCommand(executable, arguments, environmentOverrides)];
}
}