From 575df8efd8cd858c39d3a9a9b82169f864a9fe3f Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 27 Aug 2026 18:13:54 +0200 Subject: [PATCH] Skip mono/nuget C# integration tests on Ubuntu 26.04 Ubuntu dropped the `mono-complete` package in 26.04, and mono's own apt repository publishes nothing newer than `stable-focal`, so there is nothing to fall back on. 25.04 and 25.10 still ship it, so 26.04 is the cutoff. Without mono the legacy `packages.config` restore silently yields nothing and the buildless extractor falls back to downloading .NET Framework reference assemblies, so these four tests fail rather than being skipped. Uses the new `runs_on` version comparisons, which also lets the macOS clause collapse to `runs_on.macos < 15`. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- csharp/ql/integration-tests/posix/conftest.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/csharp/ql/integration-tests/posix/conftest.py b/csharp/ql/integration-tests/posix/conftest.py index 543bc046c982..ff1b954d1736 100644 --- a/csharp/ql/integration-tests/posix/conftest.py +++ b/csharp/ql/integration-tests/posix/conftest.py @@ -5,15 +5,10 @@ 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. + Returns True on Ubuntu before 26.04 and on macOS x86_64 before macOS 15. Linux other than + Ubuntu is not selected, as we do not test on it. + Ubuntu dropped the `mono-complete` package in 26.04, and mono is end-of-life, its own apt + repository publishing nothing newer than Ubuntu 20.04, so there is nothing to fall back on. + macOS 15 and later are ARM runners, which have 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 - ) - ) + return runs_on.ubuntu < 2604 or (runs_on.macos < 15 and runs_on.x86_64)