Skip to content

Commit 762b4ce

Browse files
committed
Swift: prepare integration tests for internal running
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`
1 parent 45ce988 commit 762b4ce

File tree

164 files changed

+18
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+18
-18
lines changed

swift/actions/run-integration-tests/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
- name: Run integration tests
1919
shell: bash
2020
run: |
21-
python swift/integration-tests/runner.py --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
21+
python swift/ql/integration-tests/runner.py --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
2222
env:
2323
SEMMLE_DEBUG_TRACER: 10000
2424
- name: Upload test logs
@@ -27,5 +27,5 @@ runs:
2727
with:
2828
name: swift-integration-tests-logs-${{ runner.os }}
2929
path: |
30-
swift/integration-tests/**/db/log
30+
swift/ql/integration-tests/**/db/log
3131
retention-days: 1

swift/integration-tests/qlpack.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

swift/integration-tests/.gitignore renamed to swift/ql/integration-tests/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ xcuserdata/
66
DerivedData/
77
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
88
*.actual
9-
db
9+
test-db
1010
*.swiftmodule

swift/integration-tests/create_database_utils.py renamed to swift/ql/integration-tests/create_database_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def runUnsuccessfully(cmd):
2727
def run_codeql_database_create(cmds, lang, keep_trap=True, db=None, runFunction=runSuccessfully):
2828
""" db parameter is here solely for compatibility with the internal test runner """
2929
assert lang == 'swift'
30-
codeql_root = pathlib.Path(__file__).parents[2]
31-
shutil.rmtree("db", ignore_errors=True)
30+
codeql_root = pathlib.Path(__file__).parents[3]
31+
shutil.rmtree("test-db", ignore_errors=True)
3232
cmd = [
3333
"codeql", "database", "create",
3434
"-s", ".", "-l", "swift", f"--search-path={codeql_root}", "--no-cleanup",
@@ -37,5 +37,5 @@ def run_codeql_database_create(cmds, lang, keep_trap=True, db=None, runFunction=
3737
cmd.append("--keep-trap")
3838
for c in cmds:
3939
cmd += ["-c", c]
40-
cmd.append("db")
40+
cmd.append("test-db")
4141
runFunction(cmd)

0 commit comments

Comments
 (0)