Skip to content

Skip csharp integration tests on macos-26#21339

Merged
oscarsj merged 9 commits intomainfrom
oscarsj/skip-csharp-integration-on-macos-26
Feb 18, 2026
Merged

Skip csharp integration tests on macos-26#21339
oscarsj merged 9 commits intomainfrom
oscarsj/skip-csharp-integration-on-macos-26

Conversation

@oscarsj
Copy link
Member

@oscarsj oscarsj commented Feb 17, 2026

C# integration tests for standalone dependencies are failing on macOS 26 runners due to Mono/NuGet compatibility issues. These tests already skip on macOS 15 for the same reason - unexpected .NET Framework reference assemblies appear in the missingpackages directory, causing test output mismatches.

Changes

Extended the existing platform skip conditions to include macOS 26:

# Before
@pytest.mark.only_if(
    runs_on.linux
    or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
)

# After
@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)
)

Updated 4 test files:

  • standalone_dependencies_no_framework/test.py
  • standalone_dependencies_nuget/test.py
  • standalone_dependencies_nuget_no_sources/test.py
  • standalone_dependencies_nuget with_space/test.py

Tests continue to run on Linux and macOS x86_64 (excluding versions 15 and 26).

@github-actions github-actions bot added the C# label Feb 17, 2026
@oscarsj oscarsj marked this pull request as ready for review February 17, 2026 17:13
@oscarsj oscarsj requested a review from a team as a code owner February 17, 2026 17:13
Copilot AI review requested due to automatic review settings February 17, 2026 17:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends existing platform-based skips so C# standalone-dependency integration tests are not run on macOS 26 runners where Mono/NuGet behavior causes output mismatches.

Changes:

  • Updated @pytest.mark.only_if(...) predicates to additionally exclude runs_on.macos_26.
  • Adjusted test-file comments to mention macos-26.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py Excludes macOS 26 from the only_if predicate and updates skip comment.
csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py Excludes macOS 26 from the only_if predicate and updates skip comment.
csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py Excludes macOS 26 from the only_if predicate and updates skip comment.
csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py Excludes macOS 26 from the only_if predicate and updates skip comment.

Comment on lines 7 to 11
@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)
)
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skip predicate (and its accompanying comment) is duplicated across multiple test files in this PR. To reduce duplication and keep the excluded macOS version list consistent, consider centralizing the predicate in a shared helper (e.g., a variable/fixture in conftest.py or a small utility function) and reusing it across these tests.

See below for a potential fix:

def _supports_mono_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
        )
    )


@pytest.mark.only_if(_supports_mono_nuget())

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot can you implement this suggestion?

oscarsj and others added 2 commits February 17, 2026 18:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Feb 17, 2026

@oscarsj I've opened a new pull request, #21340, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 6 commits February 17, 2026 17:21
Co-authored-by: oscarsj <1410188+oscarsj@users.noreply.github.com>
Co-authored-by: oscarsj <1410188+oscarsj@users.noreply.github.com>
Centralize mono/nuget platform skip predicate in conftest.py
Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@oscarsj oscarsj merged commit df35f9f into main Feb 18, 2026
20 checks passed
@oscarsj oscarsj deleted the oscarsj/skip-csharp-integration-on-macos-26 branch February 18, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments