Skip to content

Commit 4e29ff1

Browse files
committed
Swift: add -merge-modules to frontend-invocations test
Also, moved from Makefile to a bash source.
1 parent 6ae10c5 commit 4e29ff1

File tree

7 files changed

+22
-16
lines changed

7 files changed

+22
-16
lines changed

swift/integration-tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ DerivedData/
77
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
88
*.actual
99
db
10+
*.swiftmodule

swift/integration-tests/posix-only/frontend-invocations/F1.swift

Whitespace-only changes.

swift/integration-tests/posix-only/frontend-invocations/F2.swift

Whitespace-only changes.

swift/integration-tests/posix-only/frontend-invocations/Files.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
| C.swift:0:0:0:0 | C.swift |
44
| D.swift:0:0:0:0 | D.swift |
55
| E.swift:0:0:0:0 | E.swift |
6+
| F1.swift:0:0:0:0 | F1.swift |
7+
| F2.swift:0:0:0:0 | F2.swift |
68
| file://:0:0:0:0 | |

swift/integration-tests/posix-only/frontend-invocations/Makefile

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
if [[ "$(uname)" == Darwin ]]; then
4+
SDK="-sdk $(xcrun -show-sdk-path)"
5+
FRONTEND="$(xcrun -find swift-frontend)"
6+
else
7+
SDK=""
8+
FRONTEND="swift-frontend"
9+
fi
10+
11+
$FRONTEND -frontend -c A.swift $SDK
12+
$FRONTEND -frontend -c B.swift -o B.o $SDK
13+
$FRONTEND -frontend -c -primary-file C.swift $SDK
14+
$FRONTEND -frontend -c -primary-file D.swift -o D.o $SDK
15+
$FRONTEND -frontend -c -primary-file E.swift Esup.swift -o E.o $SDK
16+
$FRONTEND -frontend -emit-module -primary-file F1.swift F2.swift -module-name F -o F1.swiftmodule $SDK
17+
$FRONTEND -frontend -emit-module F1.swift -primary-file F2.swift -module-name F -o F2.swiftmodule $SDK
18+
$FRONTEND -merge-modules F1.swiftmodule F2.swiftmodule -o F.swiftmodule $SDK
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from create_database_utils import *
22

33
run_codeql_database_create([
4-
'make',
4+
'./build.sh',
55
], lang='swift')

0 commit comments

Comments
 (0)