mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
This harmonizes Swift integration tests with the rest of the repository, to prepare for the internal integration test runner to run them. The stripped down runner is kept compatible, so that current CI can still use it now. Maybe it will be kept for developer use. This PR includes: * moving the integration tests inside `ql` * editing `qlpack.yml` so that the internal runner can use it * change database directory to be `test-db` rather than `db`
30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -x
|
|
|
|
if [[ "$(uname)" == Darwin ]]; then
|
|
SDK="-sdk $(xcrun -show-sdk-path)"
|
|
FRONTEND="$(xcrun -find swift-frontend)"
|
|
else
|
|
SDK=""
|
|
FRONTEND="swift-frontend"
|
|
fi
|
|
|
|
function invoke() {
|
|
$FRONTEND -frontend "$@" $SDK
|
|
}
|
|
|
|
rm -rf *.swiftmodule *.o
|
|
|
|
invoke -c A.swift
|
|
invoke -c B.swift -o B.o
|
|
invoke -c -primary-file C.swift
|
|
invoke -c -primary-file D.swift -o D.o
|
|
invoke -c -primary-file E.swift Esup.swift -o E.o
|
|
invoke -emit-module -primary-file F1.swift F2.swift -module-name F -o F1.swiftmodule
|
|
invoke -emit-module F1.swift -primary-file F2.swift -module-name F -o F2.swiftmodule
|
|
invoke -emit-module F3.swift F4.swift -o Fs.swiftmodule
|
|
invoke -emit-module -merge-modules F1.swiftmodule F2.swiftmodule -o F.swiftmodule
|
|
invoke -c F5.swift -o F5.o -I.
|
|
( cd dir; invoke -c ../G.swift )
|
|
invoke -c -primary-file H1.swift -primary-file H2.swift H3.swift -emit-module-path H1.swiftmodule -emit-module-path H2.swiftmodule -o H1.o -o H2.o
|
|
invoke -emit-module -primary-file I1.swift -primary-file I2.swift -o I1.swiftmodule -o I2.swiftmodule
|