Skip to content

Commit da79d60

Browse files
committed
[DebugInfo] Make modulecache test windows-compatible
`file` is not available on windows except through GnuWin32, and that `file` was identifying the ClangModule as an ACB Archive file instead of a COFF file. Instead of using `file`, it is easier and more portable to use llvm-readobj. I also converted the egrep usage into FileCheck while adding COFF support.
1 parent 84be3f0 commit da79d60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/DebugInfo/modulecache.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import ClangModule
1515

1616
// RUN: %empty-directory(%t)
1717
// RUN: %target-swift-frontend %s -c -g -o %t.o -module-cache-path %t -I %S/Inputs
18-
// RUN: file %t/*/ClangModule-*.pcm | egrep -q '(Mach-O|ELF)'
18+
// RUN: llvm-readobj -h %t/*/ClangModule-*.pcm | %FileCheck %s
19+
// CHECK: Format: {{(Mach-O|ELF|COFF)}}
1920

2021
// 3. Test that swift-ide-check will not share swiftc's module cache.
2122

0 commit comments

Comments
 (0)