Files
codeql/swift/ql/integration-tests/posix/symlinks/test.py
Cornelius Riemenschneider a92a845719 Swift: Move all integration tests.
We are no longer bound to the platform-specific directories,
so simplify the test organization.
If you don't want this change, just skip merging this PR. It's purely optional.
2024-08-28 10:47:17 +02:00

22 lines
519 B
Python

import os
import runs_on
import pytest
@runs_on.posix
@pytest.mark.ql_test("DB-CHECK", xfail=True)
def test(codeql, swift):
symlinks = ["preserve/Sources/A.swift", "resolve/Sources/A.swift"]
for s in symlinks:
try:
os.symlink(os.getcwd() + "/main.swift", s)
except:
pass
codeql.database.create(
command=[
"swift build --package-path resolve",
"env CODEQL_PRESERVE_SYMLINKS=true swift build --package-path preserve",
]
)