Skip to content

Commit 067f325

Browse files
committed
C#: Update diagnostics calls to use new API
1 parent 1ae116c commit 067f325

File tree

1 file changed

+7
-8
lines changed
  • csharp/ql/integration-tests/all-platforms/dotnet_run

1 file changed

+7
-8
lines changed

csharp/ql/integration-tests/all-platforms/dotnet_run/test.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from create_database_utils import *
32
from diagnostics_test_utils import *
43

@@ -22,35 +21,35 @@ def check_build_out(msg, s):
2221
# no arguments, but `--`
2322
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test-db', 'dotnet run --'], "test2-db")
2423
check_build_out("Default reply", s)
25-
check_diagnostics(diagnostics_dir="test2-db/diagnostic")
24+
check_diagnostics(test_db="test2-db")
2625

2726
# one argument, no `--`
2827
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test2-db', 'dotnet run hello'], "test3-db")
2928
check_build_out("Default reply", s)
30-
check_diagnostics(diagnostics_dir="test3-db/diagnostic")
29+
check_diagnostics(test_db="test3-db")
3130

3231
# one argument, but `--`
3332
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test3-db', 'dotnet run -- hello'], "test4-db")
3433
check_build_out("Default reply", s)
35-
check_diagnostics(diagnostics_dir="test4-db/diagnostic")
34+
check_diagnostics(test_db="test4-db")
3635

3736
# two arguments, no `--`
3837
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test4-db', 'dotnet run hello world'], "test5-db")
3938
check_build_out("hello, world", s)
40-
check_diagnostics(diagnostics_dir="test5-db/diagnostic")
39+
check_diagnostics(test_db="test5-db")
4140

4241
# two arguments, and `--`
4342
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test5-db', 'dotnet run -- hello world'], "test6-db")
4443
check_build_out("hello, world", s)
45-
check_diagnostics(diagnostics_dir="test6-db/diagnostic")
44+
check_diagnostics(test_db="test6-db")
4645

4746
# shared compilation enabled; tracer should override by changing the command
4847
# to `dotnet run -p:UseSharedCompilation=true -p:UseSharedCompilation=false -- hello world`
4948
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test6-db', 'dotnet run -p:UseSharedCompilation=true -- hello world'], "test7-db")
5049
check_build_out("hello, world", s)
51-
check_diagnostics(diagnostics_dir="test7-db/diagnostic")
50+
check_diagnostics(test_db="test7-db")
5251

5352
# option passed into `dotnet run`
5453
s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test7-db', 'dotnet build', 'dotnet run --no-build hello world'], "test8-db")
5554
check_build_out("hello, world", s)
56-
check_diagnostics(diagnostics_dir="test8-db/diagnostic")
55+
check_diagnostics(test_db="test8-db")

0 commit comments

Comments
 (0)