Skip to content

Commit

Permalink
[test] Disable embedder futures test on simulated architectures.
Browse files Browse the repository at this point in the history
The VM's simulator cannot run FFI calls.

Bug: dart-lang#37299
Change-Id: If481732d715f483454f8426a8bf78967a35b0be2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409520
Commit-Queue: Ryan Macnak <[email protected]>
Reviewed-by: Alexander Aprelev <[email protected]>
  • Loading branch information
rmacnak-google authored and Commit Queue committed Feb 12, 2025
1 parent 951d966 commit 6d37abb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
27 changes: 19 additions & 8 deletions samples/embedder/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,30 @@ group("all") {

group("aot") {
deps = [
":run_futures_aot",
":run_main_aot",
":run_timer_aot",
":run_timer_async_aot",
":run_two_programs_aot",
]

# FFI can't execute on the VM's simulator
if (dart_target_arch == host_cpu) {
deps += [ ":run_futures_aot" ]
}
}

group("kernel") {
deps = [
":run_futures_kernel",
":run_main_kernel",
":run_timer_async_kernel",
":run_timer_kernel",
":run_two_programs_kernel",
]

# FFI can't execute on the VM's simulator
if (dart_target_arch == host_cpu) {
deps += [ ":run_futures_kernel" ]
}
}

# Generates a pair of executables for kernel and AOT snapshots.
Expand Down Expand Up @@ -153,11 +161,14 @@ snapshots("timer") {
main_dart = "timer.dart"
}

snapshots("futures") {
main_dart = "futures.dart"
}
# FFI can't execute on the VM's simulator
if (dart_target_arch == host_cpu) {
snapshots("futures") {
main_dart = "futures.dart"
}

sample("run_futures") {
sources = [ "run_futures.cc" ]
snapshots = [ ":futures" ]
sample("run_futures") {
sources = [ "run_futures.cc" ]
snapshots = [ ":futures" ]
}
}
3 changes: 2 additions & 1 deletion tests/standalone/embedder_samples_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ void main() {
checkSample('$out/run_timer_async_kernel', [
'$out/gen/timer_kernel.dart.snapshot',
]);
// FFI samples aren't built on some platforms.
checkSample('$out/run_futures_kernel', [
'$out/gen/futures_kernel.dart.snapshot',
]);
], skipIfNotBuilt: true);

// AOT Samples aren't built on some platforms.
checkSample('$out/run_main_aot', [
Expand Down

0 comments on commit 6d37abb

Please sign in to comment.