Files
codeql/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py
Cornelius Riemenschneider 092ce01d93 C#: Rename integration test directories.
We are no longer bound to the platform-specific directories, so simplify the test organization.
If you don't want this change, just skip merging this PR. It's purely optional.

This is not very invasive for C#, I'm just dropping the `only`
suffix. You could also merge all the platform-specific test dirs,
or all test dirs into the top-level directory. I'll leave that up to you.
2024-08-29 19:06:56 +02:00

20 lines
530 B
Python

import runs_on
@runs_on.posix
def test_implicit_build_and_test(codeql, csharp):
codeql.database.create(command="dotnet test")
# Explicitly build and then run tests.
@runs_on.posix
def test_explicit_build_and_test(codeql, csharp):
# Fix `dotnet test` picking `x64` on arm-based macOS
architecture = "-a arm64" if runs_on.arm64 else ""
codeql.database.create(
command=[
"dotnet build -o myout --os win",
f"dotnet test myout/dotnet_test_mstest.exe {architecture}",
]
)