Skip to content

Commit e8b12ce

Browse files
authored
Merge pull request #13414 from github/mbg/csharp/fix/dotnet_test_mstest
C#: Pass architecture to `dotnet test` in `dotnet_test_mstest`
2 parents f945e30 + a961fff commit e8b12ce

File tree

1 file changed

+5
-1
lines changed
  • csharp/ql/integration-tests/posix-only/dotnet_test_mstest

1 file changed

+5
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
import platform
12
from create_database_utils import *
23
from diagnostics_test_utils import *
34

45
# Implicitly build and then run tests.
56
run_codeql_database_create(['dotnet test'], test_db="test-db", lang="csharp")
67
check_diagnostics()
78

9+
# Fix `dotnet test` picking `x64` on arm-based macOS
10+
architecture = '-a arm64' if platform.machine() == 'arm64' else ''
11+
812
# Explicitly build and then run tests.
9-
run_codeql_database_create(['dotnet clean', 'rm -rf test-db', 'dotnet build -o myout --os win', 'dotnet test myout/dotnet_test_mstest.exe'], test_db="test2-db", lang="csharp")
13+
run_codeql_database_create(['dotnet clean', 'rm -rf test-db', 'dotnet build -o myout --os win', 'dotnet test myout/dotnet_test_mstest.exe ' + architecture], test_db="test2-db", lang="csharp")
1014
check_diagnostics(test_db="test2-db")

0 commit comments

Comments
 (0)