Skip to content

Commit a7fe1e6

Browse files
iinozemtsevCommit Queue
authored andcommitted
Embedder samples tests
TEST=new test for ci Change-Id: I982583ef21c5907bde1dcbc1c34e57c2c0fae770 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398902 Reviewed-by: Slava Egorov <[email protected]> Commit-Queue: Ivan Inozemtsev <[email protected]>
1 parent 3557eb4 commit a7fe1e6

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ group("runtime") {
5252
"runtime/bin:process_test",
5353
"runtime/bin:run_vm_tests",
5454
"runtime/vm:kernel_platform_files($host_toolchain)",
55+
"samples/embedder:all",
5556
"samples/ffi/http:fake_http",
5657
"utils/dartdev:dartdev",
5758
"utils/kernel-service:kernel-service",

runtime/bin/BUILD.gn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,20 @@ source_set("dart_embedder_runtime_jit_set") {
12031203
":libdart_builtin",
12041204
"..:libdart_jit",
12051205
]
1206+
1207+
if (is_win) {
1208+
libs = [
1209+
# ole32.dll contains CoTaskMemAlloc. Here so that package:ffi can look
1210+
# CoTaskMemAlloc up with `DynamicLibrary.process()`.
1211+
"ole32.lib",
1212+
"iphlpapi.lib",
1213+
"psapi.lib",
1214+
"ws2_32.lib",
1215+
"Rpcrt4.lib",
1216+
"shlwapi.lib",
1217+
"winmm.lib",
1218+
]
1219+
}
12061220
}
12071221

12081222
static_library("dart_embedder_runtime_jit") {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.disable-library-validation</key>
8+
<true/>
9+
</dict>
10+
</plist>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import 'dart:io';
2+
3+
import 'package:expect/expect.dart';
4+
5+
void main() {
6+
final executable = Platform.executable;
7+
final outDir = executable.substring(0, executable.lastIndexOf('dart'));
8+
9+
final runKernelExecutable = outDir + 'run_kernel';
10+
11+
final result = Process.runSync(runKernelExecutable, []);
12+
Expect.equals(
13+
0,
14+
result.exitCode,
15+
'process failed:\n'
16+
' exit code: ${result.exitCode}\n'
17+
' -- stdout --\n'
18+
'${result.stdout}'
19+
' -- stderr --\n'
20+
'${result.stderr}\n'
21+
' ------------',
22+
);
23+
}

0 commit comments

Comments
 (0)