From 762b4ce42e2ad64a2b29401b5dea599448ae766c Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 10:17:55 +0100 Subject: [PATCH 1/6] 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` --- swift/actions/run-integration-tests/action.yml | 4 ++-- swift/integration-tests/qlpack.yml | 7 ------- swift/{ => ql}/integration-tests/.clang-format | 0 swift/{ => ql}/integration-tests/.gitignore | 2 +- swift/{ => ql}/integration-tests/BUILD.bazel | 0 swift/{ => ql}/integration-tests/create_database_utils.py | 6 +++--- .../{ => ql}/integration-tests/diagnostics_test_utils.py | 0 .../linux-only/RegexLiteralExpr/RegexLiteralExpr.expected | 0 .../linux-only/RegexLiteralExpr/RegexLiteralExpr.ql | 0 .../linux-only/RegexLiteralExpr/regex.swift | 0 .../integration-tests/linux-only/RegexLiteralExpr/test.py | 0 .../autobuilder/unsupported-os/diagnostics.expected | 0 .../linux-only/autobuilder/unsupported-os/test.py | 0 .../osx-only/autobuilder/failure/.gitignore | 0 .../osx-only/autobuilder/failure/diagnostics.expected | 0 .../failure/hello-failure.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../osx-only/autobuilder/failure/test.py | 0 .../autobuilder/no-build-system/diagnostics.expected | 0 .../osx-only/autobuilder/no-build-system/test.py | 0 .../osx-only/autobuilder/no-build-system/x.swift | 0 .../autobuilder/no-swift-with-spm/diagnostics.expected | 0 .../hello-objective.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../no-swift-with-spm/hello-objective/Package.swift | 0 .../autobuilder/no-swift-with-spm/hello-objective/main.m | 0 .../osx-only/autobuilder/no-swift-with-spm/test.py | 0 .../osx-only/autobuilder/no-swift/diagnostics.expected | 0 .../no-swift/hello-objective.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../osx-only/autobuilder/no-swift/hello-objective/main.m | 0 .../osx-only/autobuilder/no-swift/test.py | 0 .../osx-only/autobuilder/no-xcode-with-spm/Package.swift | 0 .../autobuilder/no-xcode-with-spm/diagnostics.expected | 0 .../osx-only/autobuilder/no-xcode-with-spm/test.py | 0 .../osx-only/autobuilder/no-xcode-with-spm/x.swift | 0 .../autobuilder/only-tests-with-spm/Package.swift | 0 .../autobuilder/only-tests-with-spm/diagnostics.expected | 0 .../hello-tests.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../osx-only/autobuilder/only-tests-with-spm/test.py | 0 .../osx-only/autobuilder/only-tests/diagnostics.expected | 0 .../only-tests/hello-tests.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../osx-only/autobuilder/only-tests/test.py | 0 .../autobuilder/xcode-fails-spm-works/Files.expected | 0 .../osx-only/autobuilder/xcode-fails-spm-works/Files.ql | 0 .../autobuilder/xcode-fails-spm-works/Package.swift | 0 .../Sources/hello-world/hello_world.swift | 0 .../codeql-swift-autobuild-test.xcodeproj/project.pbxproj | 0 .../codeql-swift-autobuild-test/AppDelegate.swift | 0 .../osx-only/autobuilder/xcode-fails-spm-works/test.py | 0 .../osx-only/canonical-case/Files.expected | 0 .../integration-tests/osx-only/canonical-case/Files.ql | 0 .../osx-only/canonical-case/MiXeDcAsE.swifT | 0 .../integration-tests/osx-only/canonical-case/build.sh | 0 .../integration-tests/osx-only/canonical-case/test.py | 0 .../integration-tests/osx-only/hello-xcode/Files.expected | 0 .../integration-tests/osx-only/hello-xcode/Files.ql | 0 .../codeql-swift-autobuild-test.xcodeproj/project.pbxproj | 0 .../codeql-swift-autobuild-test/AppDelegate.swift | 0 .../integration-tests/osx-only/hello-xcode/test.py | 0 .../posix-only/cross-references/Classes.expected | 0 .../posix-only/cross-references/Classes.ql | 0 .../posix-only/cross-references/Deinitializers.expected | 0 .../posix-only/cross-references/Deinitializers.ql | 0 .../posix-only/cross-references/Enums.expected | 0 .../posix-only/cross-references/Enums.ql | 0 .../posix-only/cross-references/Functions.expected | 0 .../posix-only/cross-references/Functions.ql | 0 .../posix-only/cross-references/Initializers.expected | 0 .../posix-only/cross-references/Initializers.ql | 0 .../posix-only/cross-references/Module.expected | 0 .../posix-only/cross-references/Module.ql | 0 .../posix-only/cross-references/Operators.expected | 0 .../posix-only/cross-references/Operators.ql | 0 .../posix-only/cross-references/Package.swift | 0 .../posix-only/cross-references/Protocols.expected | 0 .../posix-only/cross-references/Protocols.ql | 0 .../cross-references/Sources/cross-references/lib.swift | 0 .../cross-references/Sources/cross-references/main.swift | 0 .../posix-only/cross-references/Structs.expected | 0 .../posix-only/cross-references/Structs.ql | 0 .../posix-only/cross-references/VarDecls.expected | 0 .../posix-only/cross-references/VarDecls.ql | 0 .../integration-tests/posix-only/cross-references/test.py | 0 .../posix-only/deduplication/BuiltinTypes.expected | 0 .../posix-only/deduplication/BuiltinTypes.ql | 0 .../posix-only/deduplication/Decls.expected | 0 .../integration-tests/posix-only/deduplication/Decls.ql | 0 .../posix-only/deduplication/Package.swift | 0 .../posix-only/deduplication/Relevant.qll | 0 .../deduplication/Sources/deduplication/def.swift | 0 .../deduplication/Sources/deduplication/use.swift | 0 .../posix-only/deduplication/Types.expected | 0 .../integration-tests/posix-only/deduplication/Types.ql | 0 .../integration-tests/posix-only/deduplication/test.py | 0 .../posix-only/frontend-invocations/.gitignore | 0 .../posix-only/frontend-invocations/A.swift | 0 .../posix-only/frontend-invocations/B.swift | 0 .../posix-only/frontend-invocations/C.swift | 0 .../posix-only/frontend-invocations/D.swift | 0 .../posix-only/frontend-invocations/E.swift | 0 .../posix-only/frontend-invocations/Esup.swift | 0 .../posix-only/frontend-invocations/F1.swift | 0 .../posix-only/frontend-invocations/F2.swift | 0 .../posix-only/frontend-invocations/F3.swift | 0 .../posix-only/frontend-invocations/F4.swift | 0 .../posix-only/frontend-invocations/F5.swift | 0 .../posix-only/frontend-invocations/Files.expected | 0 .../posix-only/frontend-invocations/Files.ql | 0 .../posix-only/frontend-invocations/G.swift | 0 .../posix-only/frontend-invocations/H1.swift | 0 .../posix-only/frontend-invocations/H2.swift | 0 .../posix-only/frontend-invocations/H3.swift | 0 .../posix-only/frontend-invocations/I1.swift | 0 .../posix-only/frontend-invocations/I2.swift | 0 .../posix-only/frontend-invocations/Modules.expected | 0 .../posix-only/frontend-invocations/Modules.ql | 0 .../posix-only/frontend-invocations/build.sh | 0 .../posix-only/frontend-invocations/dir/.empty | 0 .../posix-only/frontend-invocations/test.py | 5 +++-- .../posix-only/hello-world/Bodies.expected | 0 .../integration-tests/posix-only/hello-world/Bodies.ql | 0 .../posix-only/hello-world/Package.swift | 0 .../hello-world/Sources/hello-world/hello_world.swift | 0 .../posix-only/hello-world/test.expected | 0 .../integration-tests/posix-only/hello-world/test.py | 0 .../integration-tests/posix-only/hello-world/test.ql | 0 .../posix-only/linkage-awareness/Bodies.expected | 0 .../posix-only/linkage-awareness/Bodies.ql | 0 .../posix-only/linkage-awareness/Foo1/Package.swift | 0 .../linkage-awareness/Foo1/Sources/foo/main.swift | 0 .../posix-only/linkage-awareness/Foo2/Package.swift | 0 .../linkage-awareness/Foo2/Sources/foo/main.swift | 0 .../posix-only/linkage-awareness/build.sh | 0 .../posix-only/linkage-awareness/test.py | 0 .../posix-only/partial-modules/A/Package.swift | 0 .../posix-only/partial-modules/A/Sources/A/A.swift | 0 .../posix-only/partial-modules/A/Sources/A/Asup.swift | 0 .../posix-only/partial-modules/B/Package.swift | 0 .../posix-only/partial-modules/B/Sources/B/B.swift | 0 .../posix-only/partial-modules/B/Sources/B/Bsup.swift | 0 .../posix-only/partial-modules/Modules.expected | 0 .../posix-only/partial-modules/Modules.ql | 0 .../posix-only/partial-modules/Package.swift | 0 .../Sources/partial-modules/partial_modules.swift | 0 .../posix-only/partial-modules/Unknown.expected | 0 .../posix-only/partial-modules/Unknown.ql | 0 .../integration-tests/posix-only/partial-modules/test.py | 0 .../integration-tests/posix-only/symlinks/.gitignore | 0 .../integration-tests/posix-only/symlinks/Files.expected | 0 .../integration-tests/posix-only/symlinks/Files.ql | 0 .../integration-tests/posix-only/symlinks/main.swift | 0 .../posix-only/symlinks/preserve/Package.swift | 0 .../posix-only/symlinks/preserve/Sources/.gitkeep | 0 .../posix-only/symlinks/resolve/Package.swift | 0 .../posix-only/symlinks/resolve/Sources/.gitkeep | 0 .../integration-tests/posix-only/symlinks/test.py | 0 swift/ql/integration-tests/qlpack.yml | 4 ++++ swift/{ => ql}/integration-tests/runner.py | 8 +++++--- 164 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 swift/integration-tests/qlpack.yml rename swift/{ => ql}/integration-tests/.clang-format (100%) rename swift/{ => ql}/integration-tests/.gitignore (94%) rename swift/{ => ql}/integration-tests/BUILD.bazel (100%) rename swift/{ => ql}/integration-tests/create_database_utils.py (90%) rename swift/{ => ql}/integration-tests/diagnostics_test_utils.py (100%) rename swift/{ => ql}/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.expected (100%) rename swift/{ => ql}/integration-tests/linux-only/RegexLiteralExpr/RegexLiteralExpr.ql (100%) rename swift/{ => ql}/integration-tests/linux-only/RegexLiteralExpr/regex.swift (100%) rename swift/{ => ql}/integration-tests/linux-only/RegexLiteralExpr/test.py (100%) rename swift/{ => ql}/integration-tests/linux-only/autobuilder/unsupported-os/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/linux-only/autobuilder/unsupported-os/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/.gitignore (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/hello-failure.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/failure/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-build-system/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-build-system/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-build-system/x.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/Package.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/hello-objective/main.m (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift-with-spm/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/hello-objective.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/hello-objective/main.m (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-swift/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-xcode-with-spm/Package.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-xcode-with-spm/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-xcode-with-spm/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/no-xcode-with-spm/x.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests-with-spm/Package.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests-with-spm/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests-with-spm/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests-with-spm/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests/diagnostics.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests/hello-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/only-tests/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Files.ql (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Package.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/Sources/hello-world/hello_world.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/codeql-swift-autobuild-test/AppDelegate.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/autobuilder/xcode-fails-spm-works/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/canonical-case/Files.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/canonical-case/Files.ql (100%) rename swift/{ => ql}/integration-tests/osx-only/canonical-case/MiXeDcAsE.swifT (100%) rename swift/{ => ql}/integration-tests/osx-only/canonical-case/build.sh (100%) rename swift/{ => ql}/integration-tests/osx-only/canonical-case/test.py (100%) rename swift/{ => ql}/integration-tests/osx-only/hello-xcode/Files.expected (100%) rename swift/{ => ql}/integration-tests/osx-only/hello-xcode/Files.ql (100%) rename swift/{ => ql}/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test.xcodeproj/project.pbxproj (100%) rename swift/{ => ql}/integration-tests/osx-only/hello-xcode/codeql-swift-autobuild-test/AppDelegate.swift (100%) rename swift/{ => ql}/integration-tests/osx-only/hello-xcode/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Classes.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Classes.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Deinitializers.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Deinitializers.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Enums.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Enums.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Functions.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Functions.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Initializers.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Initializers.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Module.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Module.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Operators.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Operators.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Protocols.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Protocols.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Sources/cross-references/lib.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Sources/cross-references/main.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Structs.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/Structs.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/VarDecls.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/VarDecls.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/cross-references/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/BuiltinTypes.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/BuiltinTypes.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Decls.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Decls.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Relevant.qll (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Sources/deduplication/def.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Sources/deduplication/use.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Types.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/Types.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/deduplication/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/.gitignore (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/A.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/B.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/C.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/D.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/E.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/Esup.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/F1.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/F2.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/F3.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/F4.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/F5.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/Files.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/Files.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/G.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/H1.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/H2.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/H3.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/I1.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/I2.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/Modules.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/Modules.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/build.sh (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/dir/.empty (100%) rename swift/{ => ql}/integration-tests/posix-only/frontend-invocations/test.py (80%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/Bodies.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/Bodies.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/Sources/hello-world/hello_world.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/test.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/hello-world/test.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Bodies.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Bodies.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Foo1/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Foo1/Sources/foo/main.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Foo2/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/Foo2/Sources/foo/main.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/build.sh (100%) rename swift/{ => ql}/integration-tests/posix-only/linkage-awareness/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/A/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/A/Sources/A/A.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/A/Sources/A/Asup.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/B/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/B/Sources/B/B.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/B/Sources/B/Bsup.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Modules.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Modules.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Sources/partial-modules/partial_modules.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Unknown.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/Unknown.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/partial-modules/test.py (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/.gitignore (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/Files.expected (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/Files.ql (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/main.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/preserve/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/preserve/Sources/.gitkeep (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/resolve/Package.swift (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/resolve/Sources/.gitkeep (100%) rename swift/{ => ql}/integration-tests/posix-only/symlinks/test.py (100%) create mode 100644 swift/ql/integration-tests/qlpack.yml rename swift/{ => ql}/integration-tests/runner.py (92%) 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/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/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 100% rename from swift/integration-tests/BUILD.bazel rename to swift/ql/integration-tests/BUILD.bazel 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 100% rename from swift/integration-tests/diagnostics_test_utils.py rename to swift/ql/integration-tests/diagnostics_test_utils.py 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/integration-tests/posix-only/deduplication/Relevant.qll b/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll similarity index 100% rename from swift/integration-tests/posix-only/deduplication/Relevant.qll rename to swift/ql/integration-tests/posix-only/deduplication/Relevant.qll 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 92% rename from swift/integration-tests/runner.py rename to swift/ql/integration-tests/runner.py index bf65781cdb2b..abb17e6eafd9 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,19 @@ 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", + "--no-cleanup", + "--dataset=test-db/db-swift", f"--threads={opts.threads}", ] if opts.check_databases: From 5a771ad2cf46d0b3679f65192044d0974813ca57 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 10:42:16 +0100 Subject: [PATCH 2/6] Swift: bump python version --- swift/.python-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0fa40af13180395d14a76938a8e9ada1e5252d0d Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 11:49:19 +0100 Subject: [PATCH 3/6] Swift: fix last references to old integration test location --- codeql-workspace.yml | 1 - swift/logging/tests/assertion-diagnostics/BUILD.bazel | 2 +- swift/ql/integration-tests/BUILD.bazel | 2 +- .../ql/integration-tests/posix-only/deduplication/Relevant.qll | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) 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/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/ql/integration-tests/BUILD.bazel b/swift/ql/integration-tests/BUILD.bazel index 2fe1553da0ec..06c7eb44bee7 100644 --- a/swift/ql/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/ql/integration-tests/posix-only/deduplication/Relevant.qll b/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll index bab91e5829dc..fb76e5e35b47 100644 --- a/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll +++ b/swift/ql/integration-tests/posix-only/deduplication/Relevant.qll @@ -1,5 +1,5 @@ import swift predicate relevant(Locatable loc) { - loc.getLocation().getFile().getName().matches("%/swift/integration-tests/%/Sources/%") + loc.getLocation().getFile().getName().matches("%/swift/ql/integration-tests/%/Sources/%") } From 148033e020d51585be0aed58dd75a0dd27791a65 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 12:05:22 +0100 Subject: [PATCH 4/6] Swift: fix assertion diagnostics test --- swift/logging/tests/assertion-diagnostics/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 6707fc3a7c68f257cb99191a93befba5ef9e8b21 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 12:20:13 +0100 Subject: [PATCH 5/6] Swift: remove wrong flag in `runner.py` --- swift/ql/integration-tests/runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/swift/ql/integration-tests/runner.py b/swift/ql/integration-tests/runner.py index abb17e6eafd9..156ce6c425c5 100755 --- a/swift/ql/integration-tests/runner.py +++ b/swift/ql/integration-tests/runner.py @@ -63,7 +63,6 @@ def main(opts): "codeql", "test", "run", f"--additional-packs={codeql_root}", "--keep-databases", - "--no-cleanup", "--dataset=test-db/db-swift", f"--threads={opts.threads}", ] From 9c9f4b956ec9342342c0f2cf42d062ea99ece6ea Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 25 Mar 2024 12:36:44 +0100 Subject: [PATCH 6/6] Swift: fix db in `diagnostics_test_utils.py` --- swift/ql/integration-tests/diagnostics_test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/ql/integration-tests/diagnostics_test_utils.py b/swift/ql/integration-tests/diagnostics_test_utils.py index d3887e33b325..bc33d8b4277c 100644 --- a/swift/ql/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: