Files
swift-mirror/test/Backtracing/ImageMap.swift
Alastair Houghton ae71bd8d65 [Backtracing] Fix tests up for Windows.
We can't use `|| true` on Windows, so use `not` instead.

Also, on Windows, program names get downcased because `lit` uses
`os.path.normcase()`, so if we have program names in the output,
make sure the programs are already lower-case.

Fix up the stack overflow test to match the expected output.

Plus fix the macOS build to always build for macOS 26.0 or above.

rdar://101623384
2026-02-06 08:53:16 +00:00

28 lines
842 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -parse-as-library -Xfrontend -disable-availability-checking -Onone -o %t/image-map.exe
// RUN: %target-codesign %t/image-map.exe
// RUN: %target-run %t/image-map.exe | %FileCheck %s
// UNSUPPORTED: use_os_stdlib
// UNSUPPORTED: back_deployment_runtime
// REQUIRES: executable_test
// REQUIRES: backtracing
// REQUIRES: OS=macosx || OS=linux-gnu || OS=windows-msvc
import Runtime
@main
struct ImageMapTest {
static func main() {
let map = ImageMap.capture()
// We expect ImageMap, followed by one or more additional lines
// CHECK: {{0x[0-9a-f]*-0x[0-9a-f]*}} {{(<no build ID>|[0-9a-f]*)}} image-map.exe {{.*[\\/]}}image-map.exe
// CHECK-NEXT: {{0x[0-9a-f]*-0x[0-9a-f]*}} {{(<no build ID>|[0-9a-f]*)}} [[NAME:[^ ]*]] {{.*[\\/]}}[[NAME]]
print(map)
}
}