mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
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.
20 lines
560 B
Python
20 lines
560 B
Python
import runs_on
|
|
|
|
|
|
@runs_on.posix
|
|
def test_implicit_build_then_run(codeql, csharp):
|
|
codeql.database.create(command="dotnet test")
|
|
|
|
|
|
@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.
|
|
@runs_on.posix
|
|
def test_explicit_build_then_run_abs_path(codeql, csharp, cwd):
|
|
codeql.database.create(
|
|
command=["dotnet build -o myout", f"dotnet test {cwd}/myout/dotnet_test.dll"]
|
|
)
|