Skip to content

Commit f303110

Browse files
sstricklCommit Queue
authored and
Commit Queue
committed
[pkg/vm] Also check -Dtest_runner.configuration for arch-specific tests.
Add RISCV32 to the list of architectures checked for is32BitConfiguration. TEST=vm/dart/pointer_as_typed_list_il_test on android trybots Issue: #53774 Change-Id: I0c8297dc863b6121f9b1eafb99ae273ea2d0b34e Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm_x64-try,vm-aot-android-release-arm64c-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330740 Reviewed-by: Daco Harkes <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent c9b28eb commit f303110

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

pkg/vm/lib/testing/il_matchers.dart

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,18 +565,34 @@ final dynamic match = Matchers();
565565
/// set this field.
566566
late String Function(Symbol) getName;
567567

568+
const testRunnerKey = 'test_runner.configuration';
569+
568570
final bool isSimulator = (() {
569-
final configuration = Platform.environment['DART_CONFIGURATION'];
570-
if (configuration == null) {
571+
if (bool.hasEnvironment(testRunnerKey)) {
572+
const config = String.fromEnvironment(testRunnerKey);
573+
return config.contains('-sim');
574+
}
575+
final runtimeConfiguration = Platform.environment['DART_CONFIGURATION'];
576+
if (runtimeConfiguration == null) {
571577
throw 'Expected DART_CONFIGURATION to be defined';
572578
}
573-
return configuration.contains('SIM');
579+
return runtimeConfiguration.contains('SIM');
574580
})();
575581

576582
final bool is32BitConfiguration = (() {
577-
final configuration = Platform.environment['DART_CONFIGURATION'];
578-
if (configuration == null) {
583+
if (bool.hasEnvironment(testRunnerKey)) {
584+
const config = String.fromEnvironment(testRunnerKey);
585+
// No IA32 as AOT mode is unsupported there.
586+
return config.endsWith('arm') ||
587+
config.endsWith('arm_x64') ||
588+
config.endsWith('riscv32');
589+
}
590+
final runtimeConfiguration = Platform.environment['DART_CONFIGURATION'];
591+
if (runtimeConfiguration == null) {
579592
throw 'Expected DART_CONFIGURATION to be defined';
580593
}
581-
return configuration.endsWith('ARM') || configuration.endsWith('ARM_X64');
594+
// No IA32 as AOT mode is unsupported there.
595+
return runtimeConfiguration.endsWith('ARM') ||
596+
runtimeConfiguration.endsWith('ARM_X64') ||
597+
runtimeConfiguration.endsWith('RISCV32');
582598
})();

0 commit comments

Comments
 (0)