Skip to content

Commit f8e21c5

Browse files
sstricklCommit Queue
authored andcommitted
[pkg/test_runner] Only use .dll for assembled snapshots on Windows.
Use "out.aotsnapshot" as the name for all non-assembled snapshots and names with the appropriate shared object extension for the host OS for assembled snapshots. This ensures the test checks for .dll extensions added in https://dart-review.googlesource.com/c/sdk/+/428200 only trigger for assembled snapshots as expected, and not for other formats (e.g., Windows trybots using sanitizers, which still use direct to ELF snapshots). Also fixes incorrect line numbers in dwarf_stack_trace_test.dart. TEST=vm/dart/build_id_test standalone/dwarf_stack_trace_test Cq-Include-Trybots: luci.dart.try:vm-asan-win-release-x64-try,vm-linux-release-x64-try,vm-mac-release-arm64-try Bug: #60846 Change-Id: Ife06613d86874d76adeb99dcbc50fc3723aae584 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432660 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent 4689b49 commit f8e21c5

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

pkg/test_runner/lib/src/compiler_configuration.dart

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,15 +1409,17 @@ abstract mixin class VMKernelCompilerMixin {
14091409
String tempAssemblyFile(String tempDir) =>
14101410
Path('$tempDir/out.S').toNativePath();
14111411
String tempAOTFile(String tempDir) {
1412-
switch (_configuration.system) {
1413-
case System.android:
1414-
case System.fuchsia:
1415-
case System.linux:
1416-
return Path('$tempDir/libout.so').toNativePath();
1417-
case System.mac:
1418-
return Path('$tempDir/libout.dylib').toNativePath();
1419-
case System.win:
1420-
return Path('$tempDir/out.dll').toNativePath();
1412+
if (_configuration.genSnapshotFormat == GenSnapshotFormat.assembly) {
1413+
switch (_configuration.system) {
1414+
case System.android:
1415+
case System.fuchsia:
1416+
case System.linux:
1417+
return Path('$tempDir/libout.so').toNativePath();
1418+
case System.mac:
1419+
return Path('$tempDir/libout.dylib').toNativePath();
1420+
case System.win:
1421+
return Path('$tempDir/out.dll').toNativePath();
1422+
}
14211423
}
14221424
return Path('$tempDir/out.aotsnapshot').toNativePath();
14231425
}

tests/standalone/dwarf_stack_trace_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@ final expectedCallsInfo = <List<DartCallInfo>>[
211211
DartCallInfo(
212212
function: "bar",
213213
filename: "dwarf_stack_trace_test.dart",
214-
line: 17,
214+
line: 18,
215215
column: 3,
216216
inlined: true,
217217
),
218218
DartCallInfo(
219219
function: "foo",
220220
filename: "dwarf_stack_trace_test.dart",
221-
line: 23,
221+
line: 24,
222222
column: 3,
223223
inlined: false,
224224
),
@@ -228,7 +228,7 @@ final expectedCallsInfo = <List<DartCallInfo>>[
228228
DartCallInfo(
229229
function: "main",
230230
filename: "dwarf_stack_trace_test.dart",
231-
line: 29,
231+
line: 30,
232232
column: 5,
233233
inlined: false,
234234
),

0 commit comments

Comments
 (0)