diff --git a/codeql-workspace.yml b/codeql-workspace.yml index 7078818d1f31..9bb15b5d4a5c 100644 --- a/codeql-workspace.yml +++ b/codeql-workspace.yml @@ -28,7 +28,6 @@ provide: - "misc/suite-helpers/qlpack.yml" - "ruby/extractor-pack/codeql-extractor.yml" - "swift/extractor-pack/codeql-extractor.yml" - - "swift/integration-tests/qlpack.yml" - "ql/extractor-pack/codeql-extractor.yml" - ".github/codeql/extensions/**/codeql-pack.yml" diff --git a/swift/.python-version b/swift/.python-version index c7413b842fc0..2c0733315e41 100644 --- a/swift/.python-version +++ b/swift/.python-version @@ -1 +1 @@ -3.8.14 +3.11 diff --git a/swift/actions/run-integration-tests/action.yml b/swift/actions/run-integration-tests/action.yml index 6db78e2e01ef..2c6df4e2b513 100644 --- a/swift/actions/run-integration-tests/action.yml +++ b/swift/actions/run-integration-tests/action.yml @@ -18,7 +18,7 @@ runs: - name: Run integration tests shell: bash run: | - python swift/integration-tests/runner.py --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" + python swift/ql/integration-tests/runner.py --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" env: SEMMLE_DEBUG_TRACER: 10000 - name: Upload test logs @@ -27,5 +27,5 @@ runs: with: name: swift-integration-tests-logs-${{ runner.os }} path: | - swift/integration-tests/**/db/log + swift/ql/integration-tests/**/db/log retention-days: 1 diff --git a/swift/integration-tests/posix-only/deduplication/Relevant.qll b/swift/integration-tests/posix-only/deduplication/Relevant.qll deleted file mode 100644 index bab91e5829dc..000000000000 --- a/swift/integration-tests/posix-only/deduplication/Relevant.qll +++ /dev/null @@ -1,5 +0,0 @@ -import swift - -predicate relevant(Locatable loc) { - loc.getLocation().getFile().getName().matches("%/swift/integration-tests/%/Sources/%") -} diff --git a/swift/integration-tests/qlpack.yml b/swift/integration-tests/qlpack.yml deleted file mode 100644 index f0a644185761..000000000000 --- a/swift/integration-tests/qlpack.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: integration-tests-swift -version: 0.0.0 -dependencies: - codeql/swift-all: ${workspace} -tests: . -extractor: swift -warnOnImplicitThis: true diff --git a/swift/logging/tests/assertion-diagnostics/BUILD.bazel b/swift/logging/tests/assertion-diagnostics/BUILD.bazel index ea31eac779af..86fbbbee7c7f 100644 --- a/swift/logging/tests/assertion-diagnostics/BUILD.bazel +++ b/swift/logging/tests/assertion-diagnostics/BUILD.bazel @@ -17,5 +17,5 @@ py_test( "diagnostics.expected", ":assert-false", ], - deps = ["//swift/integration-tests:integration_tests"], + deps = ["//swift/ql/integration-tests:utils"], ) diff --git a/swift/logging/tests/assertion-diagnostics/test.py b/swift/logging/tests/assertion-diagnostics/test.py index d18cfe7dff92..03c0334fd0b5 100644 --- a/swift/logging/tests/assertion-diagnostics/test.py +++ b/swift/logging/tests/assertion-diagnostics/test.py @@ -2,7 +2,7 @@ import os import subprocess # We have to use importlib due to the '-' in the path -diagnostics_test_utils = importlib.import_module("swift.integration-tests.diagnostics_test_utils") +diagnostics_test_utils = importlib.import_module("swift.ql.integration-tests.diagnostics_test_utils") test_dir = "swift/logging/tests/assertion-diagnostics" diff --git a/swift/integration-tests/.clang-format b/swift/ql/integration-tests/.clang-format similarity index 100% rename from swift/integration-tests/.clang-format rename to swift/ql/integration-tests/.clang-format diff --git a/swift/integration-tests/.gitignore b/swift/ql/integration-tests/.gitignore similarity index 94% rename from swift/integration-tests/.gitignore rename to swift/ql/integration-tests/.gitignore index aa3e9b45c5c4..a68e1d521645 100644 --- a/swift/integration-tests/.gitignore +++ b/swift/ql/integration-tests/.gitignore @@ -6,5 +6,5 @@ xcuserdata/ DerivedData/ .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata *.actual -db +test-db *.swiftmodule diff --git a/swift/integration-tests/BUILD.bazel b/swift/ql/integration-tests/BUILD.bazel similarity index 82% rename from swift/integration-tests/BUILD.bazel rename to swift/ql/integration-tests/BUILD.bazel index 2fe1553da0ec..06c7eb44bee7 100644 --- a/swift/integration-tests/BUILD.bazel +++ b/swift/ql/integration-tests/BUILD.bazel @@ -1,5 +1,5 @@ py_library( - name = "integration_tests", + name = "utils", srcs = [ "create_database_utils.py", "diagnostics_test_utils.py", diff --git a/swift/integration-tests/create_database_utils.py b/swift/ql/integration-tests/create_database_utils.py similarity index 90% rename from swift/integration-tests/create_database_utils.py rename to swift/ql/integration-tests/create_database_utils.py index cbe2c5a7f67c..b3b3803b05bc 100644 --- a/swift/integration-tests/create_database_utils.py +++ b/swift/ql/integration-tests/create_database_utils.py @@ -27,8 +27,8 @@ def runUnsuccessfully(cmd): def run_codeql_database_create(cmds, lang, keep_trap=True, db=None, runFunction=runSuccessfully): """ db parameter is here solely for compatibility with the internal test runner """ assert lang == 'swift' - codeql_root = pathlib.Path(__file__).parents[2] - shutil.rmtree("db", ignore_errors=True) + codeql_root = pathlib.Path(__file__).parents[3] + shutil.rmtree("test-db", ignore_errors=True) cmd = [ "codeql", "database", "create", "-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= cmd.append("--keep-trap") for c in cmds: cmd += ["-c", c] - cmd.append("db") + cmd.append("test-db") runFunction(cmd) diff --git a/swift/integration-tests/diagnostics_test_utils.py b/swift/ql/integration-tests/diagnostics_test_utils.py similarity index 97% rename from swift/integration-tests/diagnostics_test_utils.py rename to swift/ql/integration-tests/diagnostics_test_utils.py index d3887e33b325..bc33d8b4277c 100644 --- a/swift/integration-tests/diagnostics_test_utils.py +++ b/swift/ql/integration-tests/diagnostics_test_utils.py @@ -50,7 +50,7 @@ def _normalize_json(data): return "\n".join(entries) -def check_diagnostics(test_dir=".", test_db="db", actual = None): +def check_diagnostics(test_dir=".", test_db="test-db", actual = None): test_dir = pathlib.Path(test_dir) test_db = pathlib.Path(test_db) if actual is None: diff --git a/swift/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.expected b/swift/ql/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.expected similarity index 100% rename from swift/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.expected rename to swift/ql/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.expected diff --git a/swift/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.ql b/swift/ql/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.ql similarity index 100% rename from swift/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.ql rename to swift/ql/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.ql diff --git a/swift/integration-tests/linux-only/RegexLiteralExpr/regex.swift b/swift/ql/integration-tests/linux-only/RegexLiteralExpr/regex.swift similarity index 100% rename from swift/integration-tests/linux-only/RegexLiteralExpr/regex.swift rename to swift/ql/integration-tests/linux-only/RegexLiteralExpr/regex.swift diff --git a/swift/integration-tests/linux-only/RegexLiteralExpr/test.py b/swift/ql/integration-tests/linux-only/RegexLiteralExpr/test.py similarity index 100% rename from swift/integration-tests/linux-only/RegexLiteralExpr/test.py rename to swift/ql/integration-tests/linux-only/RegexLiteralExpr/test.py diff --git a/swift/integration-tests/linux-only/autobuilder/unsupported-os/diagnostics.expected b/swift/ql/integration-tests/linux-only/autobuilder/unsupported-os/diagnostics.expected similarity index 100% rename from swift/integration-tests/linux-only/autobuilder/unsupported-os/diagnostics.expected rename to swift/ql/integration-tests/linux-only/autobuilder/unsupported-os/diagnostics.expected diff --git a/swift/integration-tests/linux-only/autobuilder/unsupported-os/test.py b/swift/ql/integration-tests/linux-only/autobuilder/unsupported-os/test.py similarity index 100% rename from swift/integration-tests/linux-only/autobuilder/unsupported-os/test.py rename to swift/ql/integration-tests/linux-only/autobuilder/unsupported-os/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/failure/.gitignore b/swift/ql/integration-tests/osx-only/autobuilder/failure/.gitignore similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/.gitignore rename to swift/ql/integration-tests/osx-only/autobuilder/failure/.gitignore diff --git a/swift/integration-tests/osx-only/autobuilder/failure/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/failure/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/failure/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to swift/ql/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/swift/integration-tests/osx-only/autobuilder/failure/test.py b/swift/ql/integration-tests/osx-only/autobuilder/failure/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/failure/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/failure/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/no-build-system/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/no-build-system/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-build-system/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/no-build-system/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/no-build-system/test.py b/swift/ql/integration-tests/osx-only/autobuilder/no-build-system/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-build-system/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/no-build-system/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/no-build-system/x.swift b/swift/ql/integration-tests/osx-only/autobuilder/no-build-system/x.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-build-system/x.swift rename to swift/ql/integration-tests/osx-only/autobuilder/no-build-system/x.swift diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/Package.swift b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/Package.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/Package.swift rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/Package.swift diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/main.m b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/main.m similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/main.m rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/main.m diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/test.py b/swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift-with-spm/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift-with-spm/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective/main.m b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective/main.m similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/hello-objective/main.m rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/hello-objective/main.m diff --git a/swift/integration-tests/osx-only/autobuilder/no-swift/test.py b/swift/ql/integration-tests/osx-only/autobuilder/no-swift/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-swift/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/no-swift/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/Package.swift b/swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/Package.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/Package.swift rename to swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/Package.swift diff --git a/swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/test.py b/swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/x.swift b/swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/x.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/no-xcode-with-spm/x.swift rename to swift/ql/integration-tests/osx-only/autobuilder/no-xcode-with-spm/x.swift diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/Package.swift b/swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/Package.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/Package.swift rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/Package.swift diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/test.py b/swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests-with-spm/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests-with-spm/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests/diagnostics.expected b/swift/ql/integration-tests/osx-only/autobuilder/only-tests/diagnostics.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests/diagnostics.expected rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests/diagnostics.expected diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/swift/ql/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/swift/integration-tests/osx-only/autobuilder/only-tests/test.py b/swift/ql/integration-tests/osx-only/autobuilder/only-tests/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/only-tests/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/only-tests/test.py diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.expected b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.expected similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.expected rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.expected diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.ql b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.ql similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.ql rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.ql diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Package.swift b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Package.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Package.swift rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Package.swift diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Sources/hello-world/hello_world.swift b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Sources/hello-world/hello_world.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Sources/hello-world/hello_world.swift rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Sources/hello-world/hello_world.swift diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test/AppDelegate.swift b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test/AppDelegate.swift similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test/AppDelegate.swift rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test/AppDelegate.swift diff --git a/swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/test.py b/swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/test.py similarity index 100% rename from swift/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/test.py rename to swift/ql/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/test.py diff --git a/swift/integration-tests/osx-only/canonical-case/Files.expected b/swift/ql/integration-tests/osx-only/canonical-case/Files.expected similarity index 100% rename from swift/integration-tests/osx-only/canonical-case/Files.expected rename to swift/ql/integration-tests/osx-only/canonical-case/Files.expected diff --git a/swift/integration-tests/osx-only/canonical-case/Files.ql b/swift/ql/integration-tests/osx-only/canonical-case/Files.ql similarity index 100% rename from swift/integration-tests/osx-only/canonical-case/Files.ql rename to swift/ql/integration-tests/osx-only/canonical-case/Files.ql diff --git a/swift/integration-tests/osx-only/canonical-case/MiXeDcAsE.swifT b/swift/ql/integration-tests/osx-only/canonical-case/MiXeDcAsE.swifT similarity index 100% rename from swift/integration-tests/osx-only/canonical-case/MiXeDcAsE.swifT rename to swift/ql/integration-tests/osx-only/canonical-case/MiXeDcAsE.swifT diff --git a/swift/integration-tests/osx-only/canonical-case/build.sh b/swift/ql/integration-tests/osx-only/canonical-case/build.sh similarity index 100% rename from swift/integration-tests/osx-only/canonical-case/build.sh rename to swift/ql/integration-tests/osx-only/canonical-case/build.sh diff --git a/swift/integration-tests/osx-only/canonical-case/test.py b/swift/ql/integration-tests/osx-only/canonical-case/test.py similarity index 100% rename from swift/integration-tests/osx-only/canonical-case/test.py rename to swift/ql/integration-tests/osx-only/canonical-case/test.py diff --git a/swift/integration-tests/osx-only/hello-xcode/Files.expected b/swift/ql/integration-tests/osx-only/hello-xcode/Files.expected similarity index 100% rename from swift/integration-tests/osx-only/hello-xcode/Files.expected rename to swift/ql/integration-tests/osx-only/hello-xcode/Files.expected diff --git a/swift/integration-tests/osx-only/hello-xcode/Files.ql b/swift/ql/integration-tests/osx-only/hello-xcode/Files.ql similarity index 100% rename from swift/integration-tests/osx-only/hello-xcode/Files.ql rename to swift/ql/integration-tests/osx-only/hello-xcode/Files.ql diff --git a/swift/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test.xcodeproj/project.pbxproj b/swift/ql/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test.xcodeproj/project.pbxproj similarity index 100% rename from swift/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test.xcodeproj/project.pbxproj rename to swift/ql/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test.xcodeproj/project.pbxproj diff --git a/swift/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test/AppDelegate.swift b/swift/ql/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test/AppDelegate.swift similarity index 100% rename from swift/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test/AppDelegate.swift rename to swift/ql/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test/AppDelegate.swift diff --git a/swift/integration-tests/osx-only/hello-xcode/test.py b/swift/ql/integration-tests/osx-only/hello-xcode/test.py similarity index 100% rename from swift/integration-tests/osx-only/hello-xcode/test.py rename to swift/ql/integration-tests/osx-only/hello-xcode/test.py diff --git a/swift/integration-tests/posix-only/cross-references/Classes.expected b/swift/ql/integration-tests/posix-only/cross-references/Classes.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Classes.expected rename to swift/ql/integration-tests/posix-only/cross-references/Classes.expected diff --git a/swift/integration-tests/posix-only/cross-references/Classes.ql b/swift/ql/integration-tests/posix-only/cross-references/Classes.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Classes.ql rename to swift/ql/integration-tests/posix-only/cross-references/Classes.ql diff --git a/swift/integration-tests/posix-only/cross-references/Deinitializers.expected b/swift/ql/integration-tests/posix-only/cross-references/Deinitializers.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Deinitializers.expected rename to swift/ql/integration-tests/posix-only/cross-references/Deinitializers.expected diff --git a/swift/integration-tests/posix-only/cross-references/Deinitializers.ql b/swift/ql/integration-tests/posix-only/cross-references/Deinitializers.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Deinitializers.ql rename to swift/ql/integration-tests/posix-only/cross-references/Deinitializers.ql diff --git a/swift/integration-tests/posix-only/cross-references/Enums.expected b/swift/ql/integration-tests/posix-only/cross-references/Enums.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Enums.expected rename to swift/ql/integration-tests/posix-only/cross-references/Enums.expected diff --git a/swift/integration-tests/posix-only/cross-references/Enums.ql b/swift/ql/integration-tests/posix-only/cross-references/Enums.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Enums.ql rename to swift/ql/integration-tests/posix-only/cross-references/Enums.ql diff --git a/swift/integration-tests/posix-only/cross-references/Functions.expected b/swift/ql/integration-tests/posix-only/cross-references/Functions.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Functions.expected rename to swift/ql/integration-tests/posix-only/cross-references/Functions.expected diff --git a/swift/integration-tests/posix-only/cross-references/Functions.ql b/swift/ql/integration-tests/posix-only/cross-references/Functions.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Functions.ql rename to swift/ql/integration-tests/posix-only/cross-references/Functions.ql diff --git a/swift/integration-tests/posix-only/cross-references/Initializers.expected b/swift/ql/integration-tests/posix-only/cross-references/Initializers.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Initializers.expected rename to swift/ql/integration-tests/posix-only/cross-references/Initializers.expected diff --git a/swift/integration-tests/posix-only/cross-references/Initializers.ql b/swift/ql/integration-tests/posix-only/cross-references/Initializers.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Initializers.ql rename to swift/ql/integration-tests/posix-only/cross-references/Initializers.ql diff --git a/swift/integration-tests/posix-only/cross-references/Module.expected b/swift/ql/integration-tests/posix-only/cross-references/Module.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Module.expected rename to swift/ql/integration-tests/posix-only/cross-references/Module.expected diff --git a/swift/integration-tests/posix-only/cross-references/Module.ql b/swift/ql/integration-tests/posix-only/cross-references/Module.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Module.ql rename to swift/ql/integration-tests/posix-only/cross-references/Module.ql diff --git a/swift/integration-tests/posix-only/cross-references/Operators.expected b/swift/ql/integration-tests/posix-only/cross-references/Operators.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Operators.expected rename to swift/ql/integration-tests/posix-only/cross-references/Operators.expected diff --git a/swift/integration-tests/posix-only/cross-references/Operators.ql b/swift/ql/integration-tests/posix-only/cross-references/Operators.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Operators.ql rename to swift/ql/integration-tests/posix-only/cross-references/Operators.ql diff --git a/swift/integration-tests/posix-only/cross-references/Package.swift b/swift/ql/integration-tests/posix-only/cross-references/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Package.swift rename to swift/ql/integration-tests/posix-only/cross-references/Package.swift diff --git a/swift/integration-tests/posix-only/cross-references/Protocols.expected b/swift/ql/integration-tests/posix-only/cross-references/Protocols.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Protocols.expected rename to swift/ql/integration-tests/posix-only/cross-references/Protocols.expected diff --git a/swift/integration-tests/posix-only/cross-references/Protocols.ql b/swift/ql/integration-tests/posix-only/cross-references/Protocols.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Protocols.ql rename to swift/ql/integration-tests/posix-only/cross-references/Protocols.ql diff --git a/swift/integration-tests/posix-only/cross-references/Sources/cross-references/lib.swift b/swift/ql/integration-tests/posix-only/cross-references/Sources/cross-references/lib.swift similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Sources/cross-references/lib.swift rename to swift/ql/integration-tests/posix-only/cross-references/Sources/cross-references/lib.swift diff --git a/swift/integration-tests/posix-only/cross-references/Sources/cross-references/main.swift b/swift/ql/integration-tests/posix-only/cross-references/Sources/cross-references/main.swift similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Sources/cross-references/main.swift rename to swift/ql/integration-tests/posix-only/cross-references/Sources/cross-references/main.swift diff --git a/swift/integration-tests/posix-only/cross-references/Structs.expected b/swift/ql/integration-tests/posix-only/cross-references/Structs.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Structs.expected rename to swift/ql/integration-tests/posix-only/cross-references/Structs.expected diff --git a/swift/integration-tests/posix-only/cross-references/Structs.ql b/swift/ql/integration-tests/posix-only/cross-references/Structs.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/Structs.ql rename to swift/ql/integration-tests/posix-only/cross-references/Structs.ql diff --git a/swift/integration-tests/posix-only/cross-references/VarDecls.expected b/swift/ql/integration-tests/posix-only/cross-references/VarDecls.expected similarity index 100% rename from swift/integration-tests/posix-only/cross-references/VarDecls.expected rename to swift/ql/integration-tests/posix-only/cross-references/VarDecls.expected diff --git a/swift/integration-tests/posix-only/cross-references/VarDecls.ql b/swift/ql/integration-tests/posix-only/cross-references/VarDecls.ql similarity index 100% rename from swift/integration-tests/posix-only/cross-references/VarDecls.ql rename to swift/ql/integration-tests/posix-only/cross-references/VarDecls.ql diff --git a/swift/integration-tests/posix-only/cross-references/test.py b/swift/ql/integration-tests/posix-only/cross-references/test.py similarity index 100% rename from swift/integration-tests/posix-only/cross-references/test.py rename to swift/ql/integration-tests/posix-only/cross-references/test.py diff --git a/swift/integration-tests/posix-only/deduplication/BuiltinTypes.expected b/swift/ql/integration-tests/posix-only/deduplication/BuiltinTypes.expected similarity index 100% rename from swift/integration-tests/posix-only/deduplication/BuiltinTypes.expected rename to swift/ql/integration-tests/posix-only/deduplication/BuiltinTypes.expected diff --git a/swift/integration-tests/posix-only/deduplication/BuiltinTypes.ql b/swift/ql/integration-tests/posix-only/deduplication/BuiltinTypes.ql similarity index 100% rename from swift/integration-tests/posix-only/deduplication/BuiltinTypes.ql rename to swift/ql/integration-tests/posix-only/deduplication/BuiltinTypes.ql diff --git a/swift/integration-tests/posix-only/deduplication/Decls.expected b/swift/ql/integration-tests/posix-only/deduplication/Decls.expected similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Decls.expected rename to swift/ql/integration-tests/posix-only/deduplication/Decls.expected diff --git a/swift/integration-tests/posix-only/deduplication/Decls.ql b/swift/ql/integration-tests/posix-only/deduplication/Decls.ql similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Decls.ql rename to swift/ql/integration-tests/posix-only/deduplication/Decls.ql diff --git a/swift/integration-tests/posix-only/deduplication/Package.swift b/swift/ql/integration-tests/posix-only/deduplication/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Package.swift rename to swift/ql/integration-tests/posix-only/deduplication/Package.swift diff --git a/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll b/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll new file mode 100644 index 000000000000..fb76e5e35b47 --- /dev/null +++ b/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll @@ -0,0 +1,5 @@ +import swift + +predicate relevant(Locatable loc) { + loc.getLocation().getFile().getName().matches("%/swift/ql/integration-tests/%/Sources/%") +} diff --git a/swift/integration-tests/posix-only/deduplication/Sources/deduplication/def.swift b/swift/ql/integration-tests/posix-only/deduplication/Sources/deduplication/def.swift similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Sources/deduplication/def.swift rename to swift/ql/integration-tests/posix-only/deduplication/Sources/deduplication/def.swift diff --git a/swift/integration-tests/posix-only/deduplication/Sources/deduplication/use.swift b/swift/ql/integration-tests/posix-only/deduplication/Sources/deduplication/use.swift similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Sources/deduplication/use.swift rename to swift/ql/integration-tests/posix-only/deduplication/Sources/deduplication/use.swift diff --git a/swift/integration-tests/posix-only/deduplication/Types.expected b/swift/ql/integration-tests/posix-only/deduplication/Types.expected similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Types.expected rename to swift/ql/integration-tests/posix-only/deduplication/Types.expected diff --git a/swift/integration-tests/posix-only/deduplication/Types.ql b/swift/ql/integration-tests/posix-only/deduplication/Types.ql similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Types.ql rename to swift/ql/integration-tests/posix-only/deduplication/Types.ql diff --git a/swift/integration-tests/posix-only/deduplication/test.py b/swift/ql/integration-tests/posix-only/deduplication/test.py similarity index 100% rename from swift/integration-tests/posix-only/deduplication/test.py rename to swift/ql/integration-tests/posix-only/deduplication/test.py diff --git a/swift/integration-tests/posix-only/frontend-invocations/.gitignore b/swift/ql/integration-tests/posix-only/frontend-invocations/.gitignore similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/.gitignore rename to swift/ql/integration-tests/posix-only/frontend-invocations/.gitignore diff --git a/swift/integration-tests/posix-only/frontend-invocations/A.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/A.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/A.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/A.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/B.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/B.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/B.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/B.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/C.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/C.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/C.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/C.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/D.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/D.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/D.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/D.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/E.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/E.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/E.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/E.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/Esup.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/Esup.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/Esup.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/Esup.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/F1.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/F1.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/F1.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/F1.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/F2.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/F2.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/F2.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/F2.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/F3.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/F3.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/F3.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/F3.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/F4.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/F4.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/F4.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/F4.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/F5.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/F5.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/F5.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/F5.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/Files.expected b/swift/ql/integration-tests/posix-only/frontend-invocations/Files.expected similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/Files.expected rename to swift/ql/integration-tests/posix-only/frontend-invocations/Files.expected diff --git a/swift/integration-tests/posix-only/frontend-invocations/Files.ql b/swift/ql/integration-tests/posix-only/frontend-invocations/Files.ql similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/Files.ql rename to swift/ql/integration-tests/posix-only/frontend-invocations/Files.ql diff --git a/swift/integration-tests/posix-only/frontend-invocations/G.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/G.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/G.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/G.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/H1.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/H1.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/H1.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/H1.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/H2.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/H2.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/H2.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/H2.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/H3.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/H3.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/H3.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/H3.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/I1.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/I1.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/I1.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/I1.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/I2.swift b/swift/ql/integration-tests/posix-only/frontend-invocations/I2.swift similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/I2.swift rename to swift/ql/integration-tests/posix-only/frontend-invocations/I2.swift diff --git a/swift/integration-tests/posix-only/frontend-invocations/Modules.expected b/swift/ql/integration-tests/posix-only/frontend-invocations/Modules.expected similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/Modules.expected rename to swift/ql/integration-tests/posix-only/frontend-invocations/Modules.expected diff --git a/swift/integration-tests/posix-only/frontend-invocations/Modules.ql b/swift/ql/integration-tests/posix-only/frontend-invocations/Modules.ql similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/Modules.ql rename to swift/ql/integration-tests/posix-only/frontend-invocations/Modules.ql diff --git a/swift/integration-tests/posix-only/frontend-invocations/build.sh b/swift/ql/integration-tests/posix-only/frontend-invocations/build.sh similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/build.sh rename to swift/ql/integration-tests/posix-only/frontend-invocations/build.sh diff --git a/swift/integration-tests/posix-only/frontend-invocations/dir/.empty b/swift/ql/integration-tests/posix-only/frontend-invocations/dir/.empty similarity index 100% rename from swift/integration-tests/posix-only/frontend-invocations/dir/.empty rename to swift/ql/integration-tests/posix-only/frontend-invocations/dir/.empty diff --git a/swift/integration-tests/posix-only/frontend-invocations/test.py b/swift/ql/integration-tests/posix-only/frontend-invocations/test.py similarity index 80% rename from swift/integration-tests/posix-only/frontend-invocations/test.py rename to swift/ql/integration-tests/posix-only/frontend-invocations/test.py index 06f07282e2f6..cb07988676c5 100644 --- a/swift/integration-tests/posix-only/frontend-invocations/test.py +++ b/swift/ql/integration-tests/posix-only/frontend-invocations/test.py @@ -5,7 +5,8 @@ run_codeql_database_create([ './build.sh', -], lang='swift') +], lang='swift', +) with open('hashes.expected', 'w') as expected: for f in sorted(Path().glob("*.swiftmodule")): @@ -13,7 +14,7 @@ print(f.name, sha256(module.read()).hexdigest(), file=expected) with open('hashes.actual', 'w') as actual: - hashes = [(s.name, s.resolve().name) for s in Path("db/working/swift-extraction-artifacts/store").iterdir()] + hashes = [(s.name, s.resolve().name) for s in Path("test-db/working/swift-extraction-artifacts/store").iterdir()] hashes.sort() for module, hash in hashes: print(module, hash, file=actual) diff --git a/swift/integration-tests/posix-only/hello-world/Bodies.expected b/swift/ql/integration-tests/posix-only/hello-world/Bodies.expected similarity index 100% rename from swift/integration-tests/posix-only/hello-world/Bodies.expected rename to swift/ql/integration-tests/posix-only/hello-world/Bodies.expected diff --git a/swift/integration-tests/posix-only/hello-world/Bodies.ql b/swift/ql/integration-tests/posix-only/hello-world/Bodies.ql similarity index 100% rename from swift/integration-tests/posix-only/hello-world/Bodies.ql rename to swift/ql/integration-tests/posix-only/hello-world/Bodies.ql diff --git a/swift/integration-tests/posix-only/hello-world/Package.swift b/swift/ql/integration-tests/posix-only/hello-world/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/hello-world/Package.swift rename to swift/ql/integration-tests/posix-only/hello-world/Package.swift diff --git a/swift/integration-tests/posix-only/hello-world/Sources/hello-world/hello_world.swift b/swift/ql/integration-tests/posix-only/hello-world/Sources/hello-world/hello_world.swift similarity index 100% rename from swift/integration-tests/posix-only/hello-world/Sources/hello-world/hello_world.swift rename to swift/ql/integration-tests/posix-only/hello-world/Sources/hello-world/hello_world.swift diff --git a/swift/integration-tests/posix-only/hello-world/test.expected b/swift/ql/integration-tests/posix-only/hello-world/test.expected similarity index 100% rename from swift/integration-tests/posix-only/hello-world/test.expected rename to swift/ql/integration-tests/posix-only/hello-world/test.expected diff --git a/swift/integration-tests/posix-only/hello-world/test.py b/swift/ql/integration-tests/posix-only/hello-world/test.py similarity index 100% rename from swift/integration-tests/posix-only/hello-world/test.py rename to swift/ql/integration-tests/posix-only/hello-world/test.py diff --git a/swift/integration-tests/posix-only/hello-world/test.ql b/swift/ql/integration-tests/posix-only/hello-world/test.ql similarity index 100% rename from swift/integration-tests/posix-only/hello-world/test.ql rename to swift/ql/integration-tests/posix-only/hello-world/test.ql diff --git a/swift/integration-tests/posix-only/linkage-awareness/Bodies.expected b/swift/ql/integration-tests/posix-only/linkage-awareness/Bodies.expected similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Bodies.expected rename to swift/ql/integration-tests/posix-only/linkage-awareness/Bodies.expected diff --git a/swift/integration-tests/posix-only/linkage-awareness/Bodies.ql b/swift/ql/integration-tests/posix-only/linkage-awareness/Bodies.ql similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Bodies.ql rename to swift/ql/integration-tests/posix-only/linkage-awareness/Bodies.ql diff --git a/swift/integration-tests/posix-only/linkage-awareness/Foo1/Package.swift b/swift/ql/integration-tests/posix-only/linkage-awareness/Foo1/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Foo1/Package.swift rename to swift/ql/integration-tests/posix-only/linkage-awareness/Foo1/Package.swift diff --git a/swift/integration-tests/posix-only/linkage-awareness/Foo1/Sources/foo/main.swift b/swift/ql/integration-tests/posix-only/linkage-awareness/Foo1/Sources/foo/main.swift similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Foo1/Sources/foo/main.swift rename to swift/ql/integration-tests/posix-only/linkage-awareness/Foo1/Sources/foo/main.swift diff --git a/swift/integration-tests/posix-only/linkage-awareness/Foo2/Package.swift b/swift/ql/integration-tests/posix-only/linkage-awareness/Foo2/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Foo2/Package.swift rename to swift/ql/integration-tests/posix-only/linkage-awareness/Foo2/Package.swift diff --git a/swift/integration-tests/posix-only/linkage-awareness/Foo2/Sources/foo/main.swift b/swift/ql/integration-tests/posix-only/linkage-awareness/Foo2/Sources/foo/main.swift similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/Foo2/Sources/foo/main.swift rename to swift/ql/integration-tests/posix-only/linkage-awareness/Foo2/Sources/foo/main.swift diff --git a/swift/integration-tests/posix-only/linkage-awareness/build.sh b/swift/ql/integration-tests/posix-only/linkage-awareness/build.sh similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/build.sh rename to swift/ql/integration-tests/posix-only/linkage-awareness/build.sh diff --git a/swift/integration-tests/posix-only/linkage-awareness/test.py b/swift/ql/integration-tests/posix-only/linkage-awareness/test.py similarity index 100% rename from swift/integration-tests/posix-only/linkage-awareness/test.py rename to swift/ql/integration-tests/posix-only/linkage-awareness/test.py diff --git a/swift/integration-tests/posix-only/partial-modules/A/Package.swift b/swift/ql/integration-tests/posix-only/partial-modules/A/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/A/Package.swift rename to swift/ql/integration-tests/posix-only/partial-modules/A/Package.swift diff --git a/swift/integration-tests/posix-only/partial-modules/A/Sources/A/A.swift b/swift/ql/integration-tests/posix-only/partial-modules/A/Sources/A/A.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/A/Sources/A/A.swift rename to swift/ql/integration-tests/posix-only/partial-modules/A/Sources/A/A.swift diff --git a/swift/integration-tests/posix-only/partial-modules/A/Sources/A/Asup.swift b/swift/ql/integration-tests/posix-only/partial-modules/A/Sources/A/Asup.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/A/Sources/A/Asup.swift rename to swift/ql/integration-tests/posix-only/partial-modules/A/Sources/A/Asup.swift diff --git a/swift/integration-tests/posix-only/partial-modules/B/Package.swift b/swift/ql/integration-tests/posix-only/partial-modules/B/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/B/Package.swift rename to swift/ql/integration-tests/posix-only/partial-modules/B/Package.swift diff --git a/swift/integration-tests/posix-only/partial-modules/B/Sources/B/B.swift b/swift/ql/integration-tests/posix-only/partial-modules/B/Sources/B/B.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/B/Sources/B/B.swift rename to swift/ql/integration-tests/posix-only/partial-modules/B/Sources/B/B.swift diff --git a/swift/integration-tests/posix-only/partial-modules/B/Sources/B/Bsup.swift b/swift/ql/integration-tests/posix-only/partial-modules/B/Sources/B/Bsup.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/B/Sources/B/Bsup.swift rename to swift/ql/integration-tests/posix-only/partial-modules/B/Sources/B/Bsup.swift diff --git a/swift/integration-tests/posix-only/partial-modules/Modules.expected b/swift/ql/integration-tests/posix-only/partial-modules/Modules.expected similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Modules.expected rename to swift/ql/integration-tests/posix-only/partial-modules/Modules.expected diff --git a/swift/integration-tests/posix-only/partial-modules/Modules.ql b/swift/ql/integration-tests/posix-only/partial-modules/Modules.ql similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Modules.ql rename to swift/ql/integration-tests/posix-only/partial-modules/Modules.ql diff --git a/swift/integration-tests/posix-only/partial-modules/Package.swift b/swift/ql/integration-tests/posix-only/partial-modules/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Package.swift rename to swift/ql/integration-tests/posix-only/partial-modules/Package.swift diff --git a/swift/integration-tests/posix-only/partial-modules/Sources/partial-modules/partial_modules.swift b/swift/ql/integration-tests/posix-only/partial-modules/Sources/partial-modules/partial_modules.swift similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Sources/partial-modules/partial_modules.swift rename to swift/ql/integration-tests/posix-only/partial-modules/Sources/partial-modules/partial_modules.swift diff --git a/swift/integration-tests/posix-only/partial-modules/Unknown.expected b/swift/ql/integration-tests/posix-only/partial-modules/Unknown.expected similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Unknown.expected rename to swift/ql/integration-tests/posix-only/partial-modules/Unknown.expected diff --git a/swift/integration-tests/posix-only/partial-modules/Unknown.ql b/swift/ql/integration-tests/posix-only/partial-modules/Unknown.ql similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/Unknown.ql rename to swift/ql/integration-tests/posix-only/partial-modules/Unknown.ql diff --git a/swift/integration-tests/posix-only/partial-modules/test.py b/swift/ql/integration-tests/posix-only/partial-modules/test.py similarity index 100% rename from swift/integration-tests/posix-only/partial-modules/test.py rename to swift/ql/integration-tests/posix-only/partial-modules/test.py diff --git a/swift/integration-tests/posix-only/symlinks/.gitignore b/swift/ql/integration-tests/posix-only/symlinks/.gitignore similarity index 100% rename from swift/integration-tests/posix-only/symlinks/.gitignore rename to swift/ql/integration-tests/posix-only/symlinks/.gitignore diff --git a/swift/integration-tests/posix-only/symlinks/Files.expected b/swift/ql/integration-tests/posix-only/symlinks/Files.expected similarity index 100% rename from swift/integration-tests/posix-only/symlinks/Files.expected rename to swift/ql/integration-tests/posix-only/symlinks/Files.expected diff --git a/swift/integration-tests/posix-only/symlinks/Files.ql b/swift/ql/integration-tests/posix-only/symlinks/Files.ql similarity index 100% rename from swift/integration-tests/posix-only/symlinks/Files.ql rename to swift/ql/integration-tests/posix-only/symlinks/Files.ql diff --git a/swift/integration-tests/posix-only/symlinks/main.swift b/swift/ql/integration-tests/posix-only/symlinks/main.swift similarity index 100% rename from swift/integration-tests/posix-only/symlinks/main.swift rename to swift/ql/integration-tests/posix-only/symlinks/main.swift diff --git a/swift/integration-tests/posix-only/symlinks/preserve/Package.swift b/swift/ql/integration-tests/posix-only/symlinks/preserve/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/symlinks/preserve/Package.swift rename to swift/ql/integration-tests/posix-only/symlinks/preserve/Package.swift diff --git a/swift/integration-tests/posix-only/symlinks/preserve/Sources/.gitkeep b/swift/ql/integration-tests/posix-only/symlinks/preserve/Sources/.gitkeep similarity index 100% rename from swift/integration-tests/posix-only/symlinks/preserve/Sources/.gitkeep rename to swift/ql/integration-tests/posix-only/symlinks/preserve/Sources/.gitkeep diff --git a/swift/integration-tests/posix-only/symlinks/resolve/Package.swift b/swift/ql/integration-tests/posix-only/symlinks/resolve/Package.swift similarity index 100% rename from swift/integration-tests/posix-only/symlinks/resolve/Package.swift rename to swift/ql/integration-tests/posix-only/symlinks/resolve/Package.swift diff --git a/swift/integration-tests/posix-only/symlinks/resolve/Sources/.gitkeep b/swift/ql/integration-tests/posix-only/symlinks/resolve/Sources/.gitkeep similarity index 100% rename from swift/integration-tests/posix-only/symlinks/resolve/Sources/.gitkeep rename to swift/ql/integration-tests/posix-only/symlinks/resolve/Sources/.gitkeep diff --git a/swift/integration-tests/posix-only/symlinks/test.py b/swift/ql/integration-tests/posix-only/symlinks/test.py similarity index 100% rename from swift/integration-tests/posix-only/symlinks/test.py rename to swift/ql/integration-tests/posix-only/symlinks/test.py diff --git a/swift/ql/integration-tests/qlpack.yml b/swift/ql/integration-tests/qlpack.yml new file mode 100644 index 000000000000..c9b567bebda5 --- /dev/null +++ b/swift/ql/integration-tests/qlpack.yml @@ -0,0 +1,4 @@ +dependencies: + codeql/swift-all: '*' + codeql/swift-queries: '*' +warnOnImplicitThis: true diff --git a/swift/integration-tests/runner.py b/swift/ql/integration-tests/runner.py similarity index 93% rename from swift/integration-tests/runner.py rename to swift/ql/integration-tests/runner.py index bf65781cdb2b..156ce6c425c5 100755 --- a/swift/integration-tests/runner.py +++ b/swift/ql/integration-tests/runner.py @@ -17,6 +17,7 @@ import platform this_dir = pathlib.Path(__file__).parent.resolve() +codeql_root = this_dir.parents[2] def options(): p = argparse.ArgumentParser() @@ -30,7 +31,7 @@ def options(): def execute_test(path): - shutil.rmtree(path.parent / "db", ignore_errors=True) + shutil.rmtree(path.parent / "test-db", ignore_errors=True) return subprocess.run([sys.executable, "-u", path.name], cwd=path.parent).returncode == 0 def skipped(test): @@ -51,18 +52,18 @@ def main(opts): return False os.environ["PYTHONPATH"] = str(this_dir) + os.environ["CODEQL_CONFIG_FILE"] = "/dev/null" failed_db_creation = [] succesful_db_creation = [] for t in tests: (succesful_db_creation if execute_test(t) else failed_db_creation).append(t) if succesful_db_creation: - codeql_root = this_dir.parents[1] cmd = [ "codeql", "test", "run", f"--additional-packs={codeql_root}", "--keep-databases", - "--dataset=db/db-swift", + "--dataset=test-db/db-swift", f"--threads={opts.threads}", ] if opts.check_databases: