From cf430da602624f68f670e8220c640caf4de96244 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 23 Jan 2025 09:15:54 +0100 Subject: [PATCH] Rust/Swift: add integration tests checking env dumping --- rust/ql/integration-tests/hello-project/test_project.py | 6 ++++++ swift/ql/integration-tests/posix/hello-world/test.py | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/rust/ql/integration-tests/hello-project/test_project.py b/rust/ql/integration-tests/hello-project/test_project.py index c52002d0b221..5509bc3a93d8 100644 --- a/rust/ql/integration-tests/hello-project/test_project.py +++ b/rust/ql/integration-tests/hello-project/test_project.py @@ -8,3 +8,9 @@ def test_cargo(codeql, rust, cargo, check_source_archive, rust_check_diagnostics @pytest.mark.ql_test("steps.ql", expected=".rust-project.expected") def test_rust_project(codeql, rust, rust_project, check_source_archive, rust_check_diagnostics): codeql.database.create() + +@pytest.mark.ql_test(None) +def test_do_not_print_env(codeql, rust, cargo, check_env_not_dumped, rust_check_diagnostics): + codeql.database.create(_env={ + "CODEQL_EXTRACTOR_RUST_VERBOSE": "2", + }) diff --git a/swift/ql/integration-tests/posix/hello-world/test.py b/swift/ql/integration-tests/posix/hello-world/test.py index c20dd20abd51..2b81f1393839 100644 --- a/swift/ql/integration-tests/posix/hello-world/test.py +++ b/swift/ql/integration-tests/posix/hello-world/test.py @@ -1,6 +1,15 @@ +import pytest + import runs_on @runs_on.posix def test(codeql, swift): codeql.database.create(command="swift build") + +@runs_on.posix +@pytest.mark.ql_test(None) +def test_do_not_print_env(codeql, swift, check_env_not_dumped): + codeql.database.create(command="swift build", _env={ + "CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS": "out:text:trace", + })