mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'main' into henrymercer/merge-back-rc-3.13
This commit is contained in:
@@ -1 +1 @@
|
||||
3.8.14
|
||||
3.11
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,6 +17,10 @@ swift_cc_binary(
|
||||
"//swift/third_party/swift-llvm-support",
|
||||
"@absl//absl/strings",
|
||||
],
|
||||
linkopts = select({
|
||||
"@platforms//os:macos": ["-headerpad_max_install_names"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
||||
sh_binary(
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import swift
|
||||
|
||||
predicate relevant(Locatable loc) {
|
||||
loc.getLocation().getFile().getName().matches("%/swift/integration-tests/%/Sources/%")
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
name: integration-tests-swift
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
codeql/swift-all: ${workspace}
|
||||
tests: .
|
||||
extractor: swift
|
||||
warnOnImplicitThis: true
|
||||
@@ -17,5 +17,5 @@ py_test(
|
||||
"diagnostics.expected",
|
||||
":assert-false",
|
||||
],
|
||||
deps = ["//swift/integration-tests:integration_tests"],
|
||||
deps = ["//swift/ql/integration-tests:utils"],
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ import importlib
|
||||
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"
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@ xcuserdata/
|
||||
DerivedData/
|
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||
*.actual
|
||||
db
|
||||
test-db
|
||||
*.swiftmodule
|
||||
@@ -1,5 +1,5 @@
|
||||
py_library(
|
||||
name = "integration_tests",
|
||||
name = "utils",
|
||||
srcs = [
|
||||
"create_database_utils.py",
|
||||
"diagnostics_test_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)
|
||||
@@ -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:
|
||||
@@ -0,0 +1,5 @@
|
||||
import swift
|
||||
|
||||
predicate relevant(Locatable loc) {
|
||||
loc.getLocation().getFile().getName().matches("%/swift/ql/integration-tests/%/Sources/%")
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user