From 3744ef737968ea8203e5336ed230a2e3b365bb2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Mon, 7 Apr 2025 15:43:16 +0200 Subject: [PATCH 1/2] Disable csharp tests that use nuget on macos-15 --- .../posix/standalone_dependencies_no_framework/test.py | 7 +++++-- .../posix/standalone_dependencies_nuget with_space/test.py | 7 +++++-- .../posix/standalone_dependencies_nuget/test.py | 7 +++++-- .../posix/standalone_dependencies_nuget_no_sources/test.py | 5 ++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py index 4d5c7b24bc9a..d1c1745d69b6 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py @@ -3,8 +3,11 @@ import os -# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64)) +# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +@pytest.mark.only_if( + runs_on.linux + or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) +) def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = ( "/non-existent-path" diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py index 5bfcb3bfd1c5..6d2058c684c2 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py @@ -3,8 +3,11 @@ import pytest -# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64)) +# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +@pytest.mark.only_if( + runs_on.linux + or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) +) def test(codeql, csharp): # making sure we're not doing any fallback restore: os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1" diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py index c7728b64d2af..7f88196097ff 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -2,7 +2,10 @@ import pytest -# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64)) +# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +@pytest.mark.only_if( + runs_on.linux + or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) +) def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py index a6a6123f019c..185fb5201f95 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py @@ -3,6 +3,9 @@ # Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if(runs_on.linux or (runs_on.macos and runs_on.x86_64)) +@pytest.mark.only_if( + runs_on.linux + or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) +) def test(codeql, csharp): codeql.database.create(source_root="proj", build_mode="none") From 5e74bdc8dda99bc7cdbc3007597e11c099734566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Mon, 7 Apr 2025 17:49:18 +0200 Subject: [PATCH 2/2] Disable csharp test failing on macos-15 --- .../all-platforms/diag_missing_project_files/test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py index a2676d16d9c0..fa941f346df1 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py @@ -1,2 +1,8 @@ +import pytest +import runs_on + + +# Skipping the test on macos-15, as we're running into trouble. +@pytest.mark.only_if(not runs_on.macos_15) def test(codeql, csharp): codeql.database.create(_assert_failure=True)