Skip to content

Commit cca40fc

Browse files
author
David Ungar
committed
Fix test to account for driver fix that now puts a.o into the linker filelist.
1 parent aee3cb4 commit cca40fc

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/Driver/linker.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@
7070
// RUN: %FileCheck -check-prefix SIMPLE %s < %t.simple-macosx10.10.txt
7171

7272
// RUN: %empty-directory(%t)
73-
// RUN: touch %t/a.o
73+
// RUN: echo "int dummy;" >%t/a.cpp
74+
// RUN: cc -c %t/a.cpp -o %t/a.o
7475
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s %t/a.o -o linker 2>&1 | %FileCheck -check-prefix COMPILE_AND_LINK %s
75-
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s %t/a.o -driver-filelist-threshold=0 -o linker 2>&1 | %FileCheck -check-prefix FILELIST %s
76+
// RUN: %swiftc_driver -save-temps -driver-print-jobs -target x86_64-apple-macosx10.9 %s %t/a.o -driver-filelist-threshold=0 -o linker 2>&1 | tee %t/forFilelistCapture | %FileCheck -check-prefix FILELIST %s
77+
78+
// Extract filelist name and check it out
79+
// RUN: tail -1 %t/forFilelistCapture | sed 's/.*-filelist //' | sed 's/ .*//' >%t/filelistName
80+
// RUN: %FileCheck -check-prefix FILELIST-CONTENTS %s < `cat %t/filelistName`
7681

7782
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 -emit-library %s -module-name LINKER | %FileCheck -check-prefix INFERRED_NAME_DARWIN %s
7883
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-unknown-linux-gnu -emit-library %s -module-name LINKER | %FileCheck -check-prefix INFERRED_NAME_LINUX %s
@@ -346,10 +351,10 @@
346351
// FILELIST-NOT: .o{{"? }}
347352
// FILELIST: -filelist {{"?[^-]}}
348353
// FILELIST-NOT: .o{{"? }}
349-
// FILELIST: /a.o{{"? }}
350-
// FILELIST-NOT: .o{{"? }}
351354
// FILELIST: -o linker
352355

356+
// FILELIST-CONTENTS: /linker-{{.*}}.o
357+
// FILELIST-CONTENTS: /a.o
353358

354359
// INFERRED_NAME_DARWIN: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
355360
// INFERRED_NAME_DARWIN: -module-name LINKER

0 commit comments

Comments
 (0)