Skip to content

Commit 6d37abb

Browse files
rmacnak-googleCommit Queue
authored and
Commit Queue
committed
[test] Disable embedder futures test on simulated architectures.
The VM's simulator cannot run FFI calls. Bug: #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]>
1 parent 951d966 commit 6d37abb

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

samples/embedder/BUILD.gn

+19-8
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,30 @@ group("all") {
1515

1616
group("aot") {
1717
deps = [
18-
":run_futures_aot",
1918
":run_main_aot",
2019
":run_timer_aot",
2120
":run_timer_async_aot",
2221
":run_two_programs_aot",
2322
]
23+
24+
# FFI can't execute on the VM's simulator
25+
if (dart_target_arch == host_cpu) {
26+
deps += [ ":run_futures_aot" ]
27+
}
2428
}
2529

2630
group("kernel") {
2731
deps = [
28-
":run_futures_kernel",
2932
":run_main_kernel",
3033
":run_timer_async_kernel",
3134
":run_timer_kernel",
3235
":run_two_programs_kernel",
3336
]
37+
38+
# FFI can't execute on the VM's simulator
39+
if (dart_target_arch == host_cpu) {
40+
deps += [ ":run_futures_kernel" ]
41+
}
3442
}
3543

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

156-
snapshots("futures") {
157-
main_dart = "futures.dart"
158-
}
164+
# FFI can't execute on the VM's simulator
165+
if (dart_target_arch == host_cpu) {
166+
snapshots("futures") {
167+
main_dart = "futures.dart"
168+
}
159169

160-
sample("run_futures") {
161-
sources = [ "run_futures.cc" ]
162-
snapshots = [ ":futures" ]
170+
sample("run_futures") {
171+
sources = [ "run_futures.cc" ]
172+
snapshots = [ ":futures" ]
173+
}
163174
}

tests/standalone/embedder_samples_test.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ void main() {
4444
checkSample('$out/run_timer_async_kernel', [
4545
'$out/gen/timer_kernel.dart.snapshot',
4646
]);
47+
// FFI samples aren't built on some platforms.
4748
checkSample('$out/run_futures_kernel', [
4849
'$out/gen/futures_kernel.dart.snapshot',
49-
]);
50+
], skipIfNotBuilt: true);
5051

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

0 commit comments

Comments
 (0)