Skip mono/nuget C# integration tests on Ubuntu 26.04 - #22450
Draft
redsun82 wants to merge 1 commit into
Draft
Conversation
Mono is end-of-life and its apt repository only ships Ubuntu 18.04 packages, whose gtk2-era dependencies cannot be satisfied on 26.04. 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. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are adding a sparse Ubuntu 26.04 integration test slice in
github/semmle-code(to catch breakage on upcoming runners early, the way the 22.04 slice does for the oldest supported one). Four C# tests fail there, and this is the fix for them.Why
Mono is end-of-life and its apt repository only publishes packages up to Ubuntu 18.04 (
vs-bionic). On 26.04 those packages are uninstallable, since their gtk2-era dependency chain (libgtk2.0-0,gnome-icon-theme,fsharp, ...) no longer resolves:Without mono, the failures are silent rather than obvious:
packages.configrestore needsnuget.exeunder mono, so it produces no assemblies at all andAssemblies.qlreturns an empty resultstandalone_dependencies_no_frameworkno longer finds mono's framework assemblies, so the buildless extractor falls back to downloadingmicrosoft.netframework.referenceassemblies.net481, turning 1 expected row into 242What
_supports_mono_nuget()already exists precisely to exclude platforms where mono and nuget do not work, and already excludesmacos-15/macos-26for the same class of reason. This adds Ubuntu 26.04 to it, so the four tests are deselected instead of failing.Verified by collection on both platforms (26.04 simulated by faking
freedesktop_os_release):Note for reviewers
This uses
runs_on.ubuntu_26_04, which is added by the companion semmle-code PR. These pytest integration tests only ever run from semmle-code (no workflow in this repo invokes pytest, andruns_onis supplied by semmle-code'spytest/lib), so nothing here breaks on its own. But the submodule bump must land after the semmle-code selector, or collection will fail with anAttributeError.