Skip to content

Commit df35f9f

Browse files
authored
Merge pull request #21339 from github/oscarsj/skip-csharp-integration-on-macos-26
Skip csharp integration tests on macos-26
2 parents 1357de9 + fa73cd5 commit df35f9f

File tree

5 files changed

+27
-24
lines changed
  • csharp/ql/integration-tests/posix

5 files changed

+27
-24
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import runs_on
2+
3+
4+
def _supports_mono_nuget():
5+
"""
6+
Helper function to determine if the current platform supports Mono and nuget.
7+
8+
Returns True if running on Linux or on macOS x86_64 (excluding macos-15 and macos-26).
9+
macOS ARM runners (macos-15 and macos-26) are excluded due to issues with Mono and nuget.
10+
"""
11+
return (
12+
runs_on.linux
13+
or (
14+
runs_on.macos
15+
and runs_on.x86_64
16+
and not runs_on.macos_15
17+
and not runs_on.macos_26
18+
)
19+
)

csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import runs_on
21
import pytest
32
import os
3+
from ..conftest import _supports_mono_nuget
44

55

6-
# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
7-
@pytest.mark.only_if(
8-
runs_on.linux
9-
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
10-
)
6+
@pytest.mark.only_if(_supports_mono_nuget())
117
def test(codeql, csharp):
128
os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = (
139
"/non-existent-path"

csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import os
2-
import runs_on
32
import pytest
3+
from ..conftest import _supports_mono_nuget
44

55

6-
# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
7-
@pytest.mark.only_if(
8-
runs_on.linux
9-
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
10-
)
6+
@pytest.mark.only_if(_supports_mono_nuget())
117
def test(codeql, csharp):
128
# making sure we're not doing any fallback restore:
139
os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1"
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import runs_on
21
import pytest
2+
from ..conftest import _supports_mono_nuget
33

44

5-
# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget.
6-
@pytest.mark.only_if(
7-
runs_on.linux
8-
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
9-
)
5+
@pytest.mark.only_if(_supports_mono_nuget())
106
def test(codeql, csharp):
117
codeql.database.create(build_mode="none")
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import runs_on
21
import pytest
2+
from ..conftest import _supports_mono_nuget
33

44

5-
# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget.
6-
@pytest.mark.only_if(
7-
runs_on.linux
8-
or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15)
9-
)
5+
@pytest.mark.only_if(_supports_mono_nuget())
106
def test(codeql, csharp):
117
codeql.database.create(source_root="proj", build_mode="none")

0 commit comments

Comments
 (0)