diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/test.py index 4e875926cf7..66c393d1834 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/build-constraints-exclude-all-go-files/test.py @@ -2,7 +2,7 @@ import os import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py index 4e875926cf7..1800c6ddda8 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/test.py index 53ea788dad9..728ea2171cb 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/newer-go-version-needed/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work", _assert_failure=True) diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/test.py index 53ea788dad9..728ea2171cb 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/no-go-files-found/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work", _assert_failure=True) diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/test.py index 4e875926cf7..1800c6ddda8 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-with-go-mod/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/test.py index 4e875926cf7..1800c6ddda8 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/package-not-found-without-go-mod/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "test" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py index c0a0f46fcca..6adaae10e3d 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py @@ -1,8 +1,7 @@ import os -import pytest -@pytest.mark.resolve_build_environment(source_root="work") -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["GITHUB_REPOSITORY"] = "a/b" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py index 28f47b5f071..00cb33e9eda 100644 --- a/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py +++ b/go/ql/integration-tests/all-platforms/go/resolve-build-environment/newer-go-needed/test.py @@ -1,6 +1,3 @@ -import pytest - - -@pytest.mark.resolve_build_environment(env={"GOTOOLCHAIN": "go1.21.0"}) -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.env = {"GOTOOLCHAIN": "go1.21.0"} codeql.database.create(source_root="src") diff --git a/go/ql/integration-tests/linux-only/go/dep-sample/test.py b/go/ql/integration-tests/linux-only/go/dep-sample/test.py index 4b4d8da7ca1..8635c25153b 100644 --- a/go/ql/integration-tests/linux-only/go/dep-sample/test.py +++ b/go/ql/integration-tests/linux-only/go/dep-sample/test.py @@ -1,10 +1,9 @@ import os import runs_on -import pytest -@pytest.mark.resolve_build_environment(source_root="work") @runs_on.linux -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "deptest" codeql.database.create(source_root="work") diff --git a/go/ql/integration-tests/linux-only/go/glide-sample/test.py b/go/ql/integration-tests/linux-only/go/glide-sample/test.py index bd376d76c5e..9e476ac3e67 100644 --- a/go/ql/integration-tests/linux-only/go/glide-sample/test.py +++ b/go/ql/integration-tests/linux-only/go/glide-sample/test.py @@ -1,10 +1,9 @@ import os import runs_on -import pytest -@pytest.mark.resolve_build_environment(source_root="work") @runs_on.linux -def test(codeql, go): +def test(codeql, go, check_build_environment): + check_build_environment.source_root = "work" os.environ["LGTM_INDEX_IMPORT_PATH"] = "glidetest" codeql.database.create(source_root="work")