diff --git a/csharp/ql/integration-tests/all-platforms/autobuild/test.py b/csharp/ql/integration-tests/all-platforms/autobuild/test.py index 6edef5258f88..ccbf8bd9ac68 100644 --- a/csharp/ql/integration-tests/all-platforms/autobuild/test.py +++ b/csharp/ql/integration-tests/all-platforms/autobuild/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create() diff --git a/csharp/ql/integration-tests/all-platforms/binlog/test.py b/csharp/ql/integration-tests/all-platforms/binlog/test.py index d551651fb114..b23d8e407361 100644 --- a/csharp/ql/integration-tests/all-platforms/binlog/test.py +++ b/csharp/ql/integration-tests/all-platforms/binlog/test.py @@ -1,6 +1,7 @@ import commands +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): commands.run(["dotnet", "build", "test.sln", "/bl:test.binlog"]) codeql.database.create(build_mode="none", extractor_option="binlog=test.binlog") diff --git a/csharp/ql/integration-tests/all-platforms/binlog_multiple/test.py b/csharp/ql/integration-tests/all-platforms/binlog_multiple/test.py index 585d86ef57b5..3d46563a79a0 100644 --- a/csharp/ql/integration-tests/all-platforms/binlog_multiple/test.py +++ b/csharp/ql/integration-tests/all-platforms/binlog_multiple/test.py @@ -1,6 +1,7 @@ import commands +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): commands.run(["dotnet", "build", "a/test.csproj", "/bl:a.binlog"]) commands.run(["dotnet", "build", "b/test.csproj", "/bl:b.binlog"]) diff --git a/csharp/ql/integration-tests/all-platforms/blazor/test.py b/csharp/ql/integration-tests/all-platforms/blazor/test.py index 90b827ede509..330f0c8e0e85 100644 --- a/csharp/ql/integration-tests/all-platforms/blazor/test.py +++ b/csharp/ql/integration-tests/all-platforms/blazor/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(source_root="BlazorTest") diff --git a/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/test.py b/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/test.py index a62769aadbd7..f0e2d3073af6 100644 --- a/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/test.py +++ b/csharp/ql/integration-tests/all-platforms/blazor_build_mode_none/test.py @@ -1,5 +1,7 @@ import pytest +import dotnet +@dotnet.xdist_group_if_macos @pytest.mark.ql_test("DB-CHECK", xfail=True) def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/blazor_net_8/test.py b/csharp/ql/integration-tests/all-platforms/blazor_net_8/test.py index 90b827ede509..330f0c8e0e85 100644 --- a/csharp/ql/integration-tests/all-platforms/blazor_net_8/test.py +++ b/csharp/ql/integration-tests/all-platforms/blazor_net_8/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(source_root="BlazorTest") diff --git a/csharp/ql/integration-tests/all-platforms/conditional_compilation/test.py b/csharp/ql/integration-tests/all-platforms/conditional_compilation/test.py index bf69f536b659..7eb44d96ee33 100644 --- a/csharp/ql/integration-tests/all-platforms/conditional_compilation/test.py +++ b/csharp/ql/integration-tests/all-platforms/conditional_compilation/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_OPTION_TRAP_COMPRESSION"] = "none" codeql.database.create( diff --git a/csharp/ql/integration-tests/all-platforms/cshtml/test.py b/csharp/ql/integration-tests/all-platforms/cshtml/test.py index 7085307904f9..ec19d6061049 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(command="dotnet build") diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py index 237174a46c6b..5ce95a5c8b53 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py index 88ecf0e513ac..67af9d8a224d 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_EXTRACT_WEB_VIEWS"] = "false" codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py index 237174a46c6b..5ce95a5c8b53 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py index 237174a46c6b..5ce95a5c8b53 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/test.py b/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/test.py index a2676d16d9c0..026328cc13f6 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/test.py +++ b/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(_assert_failure=True) diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py index a2676d16d9c0..026328cc13f6 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(_assert_failure=True) diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/test.py b/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/test.py index a2676d16d9c0..026328cc13f6 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/test.py +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(_assert_failure=True) diff --git a/csharp/ql/integration-tests/all-platforms/diag_recursive_generics/test.py b/csharp/ql/integration-tests/all-platforms/diag_recursive_generics/test.py index 7085307904f9..ec19d6061049 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_recursive_generics/test.py +++ b/csharp/ql/integration-tests/all-platforms/diag_recursive_generics/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(command="dotnet build") diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py index 903d34300616..e897cfa82268 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_10/test.py @@ -1,5 +1,9 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test1(codeql, csharp): codeql.database.create() +@dotnet.xdist_group_if_macos def test2(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py index 75ba09477fa0..5e312369eb74 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py @@ -1,4 +1,5 @@ import os +import dotnet def check_build_out(msg, s): lines = s.splitlines() @@ -6,11 +7,13 @@ def check_build_out(msg, s): any (("[build-stdout]" in line) and (msg in line) for line in lines) ), f"The C# tracer did not interpret the dotnet path-to-application command correctly." +@dotnet.xdist_group_if_macos def test1(codeql, csharp): codeql.database.create(command="dotnet build") # This test checks that we don't inject any flags when running the application using `dotnet` +@dotnet.xdist_group_if_macos def test2(codeql, csharp, cwd): s = codeql.database.create( command=[ diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_no_args_inject/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_no_args_inject/test.py index d1a7fba48701..cb455496be90 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_no_args_inject/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_no_args_inject/test.py @@ -1,3 +1,6 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.init("test-db", source_root=".") # the tracer configuration should not inject the extra command-line arguments for these commands diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py index fc75ed1870f3..688e8a1d4590 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_pack/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(command="dotnet pack -o nugetpackage") assert os.path.isfile( diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_publish/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_publish/test.py index ffe0332d6639..0377869d8375 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_publish/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_publish/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): artifacts = "bin/Temp" codeql.database.create(command=f"dotnet publish -o {artifacts}") diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py index 8740bad71a84..f5257714663e 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py @@ -1,3 +1,5 @@ +import dotnet + def check_build_out(msg, s): lines = s.splitlines() assert ( @@ -5,36 +7,42 @@ def check_build_out(msg, s): ), "The C# tracer did not interpret the 'dotnet run' command correctly" # no arguments +@dotnet.xdist_group_if_macos def test_no_args(codeql, csharp): s = codeql.database.create(command="dotnet run", _capture="stdout") check_build_out("Default reply", s) # no arguments, but `--` +@dotnet.xdist_group_if_macos def test_no_arg_dash_dash(codeql, csharp): s = codeql.database.create(command="dotnet run --", _capture="stdout") check_build_out("Default reply", s) # one argument, no `--` +@dotnet.xdist_group_if_macos def test_one_arg_no_dash_dash(codeql, csharp): s = codeql.database.create(command="dotnet run hello", _capture="stdout") check_build_out("Default reply", s) # one argument, but `--` +@dotnet.xdist_group_if_macos def test_one_arg_dash_dash(codeql, csharp): s = codeql.database.create(command="dotnet run -- hello", _capture="stdout") check_build_out("Default reply", s) # two arguments, no `--` +@dotnet.xdist_group_if_macos def test_two_args_no_dash_dash(codeql, csharp): s = codeql.database.create(command="dotnet run hello world", _capture="stdout") check_build_out("hello, world", s) # two arguments, and `--` +@dotnet.xdist_group_if_macos def test_two_args_dash_dash(codeql, csharp): s = codeql.database.create(command="dotnet run -- hello world", _capture="stdout") check_build_out("hello, world", s) @@ -42,6 +50,7 @@ def test_two_args_dash_dash(codeql, csharp): # shared compilation enabled; tracer should override by changing the command # to `dotnet run -p:UseSharedCompilation=true -p:UseSharedCompilation=false -- hello world` +@dotnet.xdist_group_if_macos def test_shared_compilation(codeql, csharp): s = codeql.database.create( command="dotnet run -p:UseSharedCompilation=true -- hello world", _capture="stdout" @@ -50,6 +59,7 @@ def test_shared_compilation(codeql, csharp): # option passed into `dotnet run` +@dotnet.xdist_group_if_macos def test_option(codeql, csharp): s = codeql.database.create( command=["dotnet build", "dotnet run --no-build hello world"], _capture="stdout" @@ -58,12 +68,14 @@ def test_option(codeql, csharp): # two arguments, no '--' (first argument quoted) +@dotnet.xdist_group_if_macos def test_two_args_no_dash_dash_quote_first(codeql, csharp): s = codeql.database.create(command='dotnet run "hello world" part2', _capture="stdout") check_build_out("hello world, part2", s) # two arguments, no '--' (second argument quoted) and using dotnet to execute dotnet +@dotnet.xdist_group_if_macos def test_two_args_no_dash_dash_quote_second(codeql, csharp): s = codeql.database.create(command='dotnet dotnet run hello "world part2"', _capture="stdout") check_build_out("hello, world part2", s) diff --git a/csharp/ql/integration-tests/all-platforms/msbuild/test.py b/csharp/ql/integration-tests/all-platforms/msbuild/test.py index d93379073354..61153cd327f5 100644 --- a/csharp/ql/integration-tests/all-platforms/msbuild/test.py +++ b/csharp/ql/integration-tests/all-platforms/msbuild/test.py @@ -1,3 +1,6 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): # force CodeQL to use MSBuild by setting `LGTM_INDEX_MSBUILD_TARGET` codeql.database.create(_env={"LGTM_INDEX_MSBUILD_TARGET": "Build"}) diff --git a/csharp/ql/integration-tests/all-platforms/source_generator/test.py b/csharp/ql/integration-tests/all-platforms/source_generator/test.py index 7085307904f9..ec19d6061049 100644 --- a/csharp/ql/integration-tests/all-platforms/source_generator/test.py +++ b/csharp/ql/integration-tests/all-platforms/source_generator/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(command="dotnet build") diff --git a/csharp/ql/integration-tests/all-platforms/standalone/test.py b/csharp/ql/integration-tests/all-platforms/standalone/test.py index f93a36594c8b..747ee1b636f2 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_OPTION_COMPILER_DIAGNOSTIC_LIMIT"] = "2" os.environ["CODEQL_EXTRACTOR_CSHARP_OPTION_MESSAGE_LIMIT"] = "5" diff --git a/csharp/ql/integration-tests/all-platforms/standalone_buildless_option/test.py b/csharp/ql/integration-tests/all-platforms/standalone_buildless_option/test.py index 9a17ccf3b59a..b5294879f5cf 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_buildless_option/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_buildless_option/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_OPTION_BUILDLESS"] = "true" codeql.database.create() diff --git a/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py b/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py index 237174a46c6b..5ce95a5c8b53 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/all-platforms/standalone_dependency_dir/test.py b/csharp/ql/integration-tests/all-platforms/standalone_dependency_dir/test.py index 3629693ad29e..053bcd994829 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_dependency_dir/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_dependency_dir/test.py @@ -1,6 +1,8 @@ import os import shutil +import dotnet +@dotnet.xdist_group_if_macos def test(codeql, csharp, cwd): path = os.path.join(cwd, "dependencies") os.environ["CODEQL_EXTRACTOR_CSHARP_OPTION_BUILDLESS_DEPENDENCY_DIR"] = path diff --git a/csharp/ql/integration-tests/all-platforms/standalone_failed/test.py b/csharp/ql/integration-tests/all-platforms/standalone_failed/test.py index 2d8beed3deba..b65cc177d402 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_failed/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_failed/test.py @@ -1,2 +1,5 @@ +import dotnet + +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none", _assert_failure=True) diff --git a/csharp/ql/integration-tests/all-platforms/standalone_resx/test.py b/csharp/ql/integration-tests/all-platforms/standalone_resx/test.py index d799c830dd94..64e53053ecf4 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_resx/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_resx/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): # Making sure the reachability test of `nuget.org` succeeds: os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1000" diff --git a/csharp/ql/integration-tests/all-platforms/standalone_winforms/test.py b/csharp/ql/integration-tests/all-platforms/standalone_winforms/test.py index c4f98dd36290..cad710867f7c 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_winforms/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_winforms/test.py @@ -1,6 +1,7 @@ import os +import dotnet - +@dotnet.xdist_group_if_macos def test(codeql, csharp): # Making sure the reachability test of `nuget.org` succeeds: os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1000" diff --git a/csharp/ql/integration-tests/posix/diag_autobuild_script/test.py b/csharp/ql/integration-tests/posix/diag_autobuild_script/test.py index f6a940c18c11..eadd73a1e4eb 100644 --- a/csharp/ql/integration-tests/posix/diag_autobuild_script/test.py +++ b/csharp/ql/integration-tests/posix/diag_autobuild_script/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(_assert_failure=True) diff --git a/csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py b/csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py index f6a940c18c11..eadd73a1e4eb 100644 --- a/csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py +++ b/csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(_assert_failure=True) diff --git a/csharp/ql/integration-tests/posix/dotnet_test/test.py b/csharp/ql/integration-tests/posix/dotnet_test/test.py index 6417f6a17971..6deee83261cf 100644 --- a/csharp/ql/integration-tests/posix/dotnet_test/test.py +++ b/csharp/ql/integration-tests/posix/dotnet_test/test.py @@ -1,17 +1,20 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test_implicit_build_then_run(codeql, csharp): codeql.database.create(command="dotnet test") +@dotnet.xdist_group_if_macos @runs_on.posix def test_explicit_build_then_run(codeql, csharp): codeql.database.create(command=["dotnet build -o myout", "dotnet test myout/dotnet_test.dll"]) # Explicit build and then run tests using the absolute path. +@dotnet.xdist_group_if_macos @runs_on.posix def test_explicit_build_then_run_abs_path(codeql, csharp, cwd): codeql.database.create( diff --git a/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py b/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py index e59a23edb600..a941ffb0a4d5 100644 --- a/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py +++ b/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py @@ -1,12 +1,14 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test_implicit_build_and_test(codeql, csharp): codeql.database.create(command="dotnet test") # Explicitly build and then run tests. +@dotnet.xdist_group_if_macos @runs_on.posix def test_explicit_build_and_test(codeql, csharp): # Fix `dotnet test` picking `x64` on arm-based macOS diff --git a/csharp/ql/integration-tests/posix/inherit-env-vars/test.py b/csharp/ql/integration-tests/posix/inherit-env-vars/test.py index 31e31c8565d4..82443dc01a55 100644 --- a/csharp/ql/integration-tests/posix/inherit-env-vars/test.py +++ b/csharp/ql/integration-tests/posix/inherit-env-vars/test.py @@ -1,7 +1,8 @@ import os import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): os.environ["PROJECT_TO_BUILD"] = "proj.csproj.no_auto" diff --git a/csharp/ql/integration-tests/posix/query-suite/test.py b/csharp/ql/integration-tests/posix/query-suite/test.py index 0bc7182bc086..2a2e609f7988 100644 --- a/csharp/ql/integration-tests/posix/query-suite/test.py +++ b/csharp/ql/integration-tests/posix/query-suite/test.py @@ -1,14 +1,17 @@ import runs_on import pytest +import dotnet from query_suites import * well_known_query_suites = ['csharp-code-quality.qls', 'csharp-code-quality-extended.qls', 'csharp-security-and-quality.qls', 'csharp-security-extended.qls', 'csharp-code-scanning.qls'] +@dotnet.xdist_group_if_macos @runs_on.posix @pytest.mark.parametrize("query_suite", well_known_query_suites) def test(codeql, csharp, check_query_suite, query_suite): check_query_suite(query_suite) +@dotnet.xdist_group_if_macos @runs_on.posix def test_not_included_queries(codeql, csharp, check_queries_not_included): check_queries_not_included('csharp', well_known_query_suites) diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies/test.py index 5aaafca6a46a..d31799935963 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py index 5aaafca6a46a..d31799935963 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py index 5aaafca6a46a..d31799935963 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py index 5aaafca6a46a..d31799935963 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(build_mode="none") 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..8cdb38080515 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,13 +1,14 @@ import runs_on import pytest import os - +import dotnet # Skipping the test on the ARM runners and macos-15, 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) ) +@dotnet.xdist_group_if_macos 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 6d2058c684c2..b76ea6628435 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,13 +1,14 @@ import os import runs_on import pytest - +import dotnet # Skipping the test on the ARM runners and macos-15, 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) ) +@dotnet.xdist_group_if_macos 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 7f88196097ff..d514ff44f2e3 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -1,11 +1,12 @@ import runs_on import pytest - +import dotnet # Skipping the test on the ARM runners and macos-15, 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) ) +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py index 42405ca54d4e..a758fdaa1301 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py @@ -1,7 +1,8 @@ import os import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): # Making sure the reachability test of `nuget.org` succeeds: diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py index 9dcc8952b173..5fe704bdccf7 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py @@ -1,7 +1,8 @@ import os import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): # os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK"] = "true" # NuGet feed check is enabled by default diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py index 56bd28a23291..e333e81e2be7 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py @@ -1,7 +1,8 @@ import os import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): 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..76a036c07753 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,11 +1,12 @@ import runs_on import pytest - +import dotnet # Skipping the test on the ARM runners, 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) ) +@dotnet.xdist_group_if_macos def test(codeql, csharp): codeql.database.create(source_root="proj", build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py index 5aaafca6a46a..d31799935963 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/warn_as_error/test.py b/csharp/ql/integration-tests/posix/warn_as_error/test.py index 1b7bbd051235..c876a946915c 100644 --- a/csharp/ql/integration-tests/posix/warn_as_error/test.py +++ b/csharp/ql/integration-tests/posix/warn_as_error/test.py @@ -1,6 +1,7 @@ import runs_on +import dotnet - +@dotnet.xdist_group_if_macos @runs_on.posix def test(codeql, csharp): codeql.database.create(command="./build.sh")