Skip to content

Commit 21cb490

Browse files
committed
C#: Add integration test.
1 parent 7ea8f88 commit 21cb490

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

csharp/ql/integration-tests/posix-only/dotnet_test/dotnet_test.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>enable</Nullable>
6-
76
<IsPackable>false</IsPackable>
87
</PropertyGroup>
98

@@ -14,4 +13,9 @@
1413
<PackageReference Include="coverlet.collector" Version="3.2.0" />
1514
</ItemGroup>
1615

16+
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean">
17+
<RemoveDir Directories=".\bin" />
18+
<RemoveDir Directories=".\obj" />
19+
<RemoveDir Directories=".\myout" />
20+
</Target>
1721
</Project>

csharp/ql/integration-tests/posix-only/dotnet_test/test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
# Explicitly build and then run tests.
99
run_codeql_database_create(['dotnet clean', 'rm -rf test-db', 'dotnet build -o myout', 'dotnet test myout/dotnet_test.dll'], test_db="test2-db", lang="csharp")
1010
check_diagnostics(test_db="test2-db")
11+
12+
thisDir = os.path.abspath(os.getcwd())
13+
# Explicit build and then run tests using the absolute path.
14+
run_codeql_database_create(['dotnet clean', 'rm -rf test2-db', 'dotnet build -o myout', f'dotnet test {thisDir}/myout/dotnet_test.dll'], test_db="test3-db", lang="csharp")
15+
check_diagnostics(test_db="test3-db")

0 commit comments

Comments
 (0)