From 0676ba1c07d9741b04fe077379588ccbf6d06fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Tue, 17 Feb 2026 17:23:38 +0100 Subject: [PATCH 1/7] Skip csharp integration tests on macos-26 --- .../posix/standalone_dependencies_no_framework/test.py | 6 ++++-- .../posix/standalone_dependencies_nuget with_space/test.py | 6 ++++-- .../posix/standalone_dependencies_nuget/test.py | 6 ++++-- .../posix/standalone_dependencies_nuget_no_sources/test.py | 6 ++++-- 4 files changed, 16 insertions(+), 8 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 d1c1745d69b6..e0181a1ec5df 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,10 +3,12 @@ import os -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +# Skipping the test on the ARM runners, macos-15 and macos-26, 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) + or (runs_on.macos and runs_on.x86_64 + and not runs_on.macos_15 and not runs_on.macos_26) ) def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = ( 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 6d2058c684c2..4f3097bb3872 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,10 +3,12 @@ import pytest -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +# Skipping the test on the ARM runners, macos-15 and macos-26, 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) + or (runs_on.macos and runs_on.x86_64 + and not runs_on.macos_15 and not runs_on.macos_26) ) def test(codeql, csharp): # making sure we're not doing any fallback restore: 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 7f88196097ff..9a8c9b2291e4 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -2,10 +2,12 @@ import pytest -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. +# Skipping the test on the ARM runners, macos-15 and macos-26, 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) + or (runs_on.macos and runs_on.x86_64 + and not runs_on.macos_15 and not runs_on.macos_26) ) 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 185fb5201f95..f095580d34dc 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 @@ -2,10 +2,12 @@ import pytest -# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. +# Skipping the test on the ARM runners, macos-15 and macos-26, 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) + or (runs_on.macos and runs_on.x86_64 + and not runs_on.macos_15 and not runs_on.macos_26) ) def test(codeql, csharp): codeql.database.create(source_root="proj", build_mode="none") From 5cf281a1b6b9fe060e00811a56056ba7845edd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Tue, 17 Feb 2026 18:16:51 +0100 Subject: [PATCH 2/7] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../posix/standalone_dependencies_no_framework/test.py | 2 +- .../posix/standalone_dependencies_nuget/test.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 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 e0181a1ec5df..8f66ebf714e1 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,7 +3,7 @@ import os -# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running +# Skipping the test on the ARM runners, macos-15 and macos-26, as we're running # into trouble with Mono and nuget. @pytest.mark.only_if( runs_on.linux 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 9a8c9b2291e4..ebdad77e7168 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -6,8 +6,14 @@ # 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 and not runs_on.macos_26) + or ( + runs_on.macos + and runs_on.x86_64 + and not ( + runs_on.macos_15 + or runs_on.macos_26 + ) + ) ) def test(codeql, csharp): codeql.database.create(build_mode="none") From 9efe1120260b306d86282e8da35828581b1b9ef0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:16:54 +0000 Subject: [PATCH 3/7] Initial plan From 004ebd386c85c7548f39e37c0efd2fdb4d4afa71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:21:50 +0000 Subject: [PATCH 4/7] Centralize mono/nuget skip predicate in conftest.py Co-authored-by: oscarsj <1410188+oscarsj@users.noreply.github.com> --- csharp/ql/integration-tests/posix/conftest.py | 20 +++++++++++++++++++ .../test.py | 10 ++-------- .../test.py | 10 ++-------- .../standalone_dependencies_nuget/test.py | 16 ++------------- .../test.py | 10 ++-------- 5 files changed, 28 insertions(+), 38 deletions(-) create mode 100644 csharp/ql/integration-tests/posix/conftest.py diff --git a/csharp/ql/integration-tests/posix/conftest.py b/csharp/ql/integration-tests/posix/conftest.py new file mode 100644 index 000000000000..0cd4ee6cfa0d --- /dev/null +++ b/csharp/ql/integration-tests/posix/conftest.py @@ -0,0 +1,20 @@ +import runs_on +import pytest + + +def _supports_mono_nuget(): + """ + Helper function to determine if the current platform supports Mono and nuget. + + Returns True if running on Linux or on macOS x86_64 (excluding macos-15 and macos-26). + macOS ARM runners (macos-15 and macos-26) are excluded due to issues with Mono and nuget. + """ + return ( + runs_on.linux + or ( + runs_on.macos + and runs_on.x86_64 + and not runs_on.macos_15 + and not runs_on.macos_26 + ) + ) 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 8f66ebf714e1..3d0d011f73d7 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 @@ -1,15 +1,9 @@ -import runs_on import pytest import os +from conftest import _supports_mono_nuget -# Skipping the test on the ARM runners, macos-15 and macos-26, 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 and not runs_on.macos_26) -) +@pytest.mark.only_if(_supports_mono_nuget()) 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 4f3097bb3872..1b111d082397 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 @@ -1,15 +1,9 @@ import os -import runs_on import pytest +from conftest import _supports_mono_nuget -# Skipping the test on the ARM runners, macos-15 and macos-26, 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 and not runs_on.macos_26) -) +@pytest.mark.only_if(_supports_mono_nuget()) 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 ebdad77e7168..2d887a522445 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -1,19 +1,7 @@ -import runs_on import pytest +from conftest import _supports_mono_nuget -# Skipping the test on the ARM runners, macos-15 and macos-26, 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 - or runs_on.macos_26 - ) - ) -) +@pytest.mark.only_if(_supports_mono_nuget()) 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 f095580d34dc..a2bb13e921b9 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 @@ -1,13 +1,7 @@ -import runs_on import pytest +from conftest import _supports_mono_nuget -# Skipping the test on the ARM runners, macos-15 and macos-26, 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 and not runs_on.macos_26) -) +@pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): codeql.database.create(source_root="proj", build_mode="none") From 60b8213fdda848af3dfc2eca803f252fcf98ede6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:22:27 +0000 Subject: [PATCH 5/7] Remove unused pytest import from conftest.py Co-authored-by: oscarsj <1410188+oscarsj@users.noreply.github.com> --- csharp/ql/integration-tests/posix/conftest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/csharp/ql/integration-tests/posix/conftest.py b/csharp/ql/integration-tests/posix/conftest.py index 0cd4ee6cfa0d..543bc046c982 100644 --- a/csharp/ql/integration-tests/posix/conftest.py +++ b/csharp/ql/integration-tests/posix/conftest.py @@ -1,5 +1,4 @@ import runs_on -import pytest def _supports_mono_nuget(): From 6760390d754b01d020cfef2652791bc715770683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Tue, 17 Feb 2026 18:49:11 +0100 Subject: [PATCH 6/7] Fix imports --- .../posix/standalone_dependencies_no_framework/test.py | 3 ++- .../posix/standalone_dependencies_nuget with_space/test.py | 2 +- .../posix/standalone_dependencies_nuget/test.py | 2 +- .../posix/standalone_dependencies_nuget_no_sources/test.py | 2 +- 4 files changed, 5 insertions(+), 4 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 3d0d011f73d7..21987ed7a2d9 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 @@ -1,6 +1,7 @@ import pytest import os -from conftest import _supports_mono_nuget +from ..conftest import _supports_mono_nuget + @pytest.mark.only_if(_supports_mono_nuget()) 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 1b111d082397..662178aa3c0f 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 @@ -1,6 +1,6 @@ import os import pytest -from conftest import _supports_mono_nuget +from ..conftest import _supports_mono_nuget @pytest.mark.only_if(_supports_mono_nuget()) 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 2d887a522445..d8e8c8055ad5 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -1,5 +1,5 @@ import pytest -from conftest import _supports_mono_nuget +from ..conftest import _supports_mono_nuget @pytest.mark.only_if(_supports_mono_nuget()) 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 a2bb13e921b9..ccd8f61a3845 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 @@ -1,5 +1,5 @@ import pytest -from conftest import _supports_mono_nuget +from ..conftest import _supports_mono_nuget @pytest.mark.only_if(_supports_mono_nuget()) From fa73cd5d5c8233a1a1633f0f8fcc5147627df1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20San=20Jos=C3=A9?= Date: Tue, 17 Feb 2026 18:49:51 +0100 Subject: [PATCH 7/7] Remove unnecessary blank line in test.py --- .../posix/standalone_dependencies_no_framework/test.py | 1 - 1 file changed, 1 deletion(-) 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 21987ed7a2d9..725ded1899c9 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,7 +3,6 @@ from ..conftest import _supports_mono_nuget - @pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = (