Skip to content

Commit 65e6515

Browse files
committed
C#: Address review comments.
1 parent f9c890b commit 65e6515

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

csharp/tools/tracing-config.lua

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function RegisterExtractorPack(id)
2121
-- if that's `build`, we append `-p:UseSharedCompilation=false` to the command line,
2222
-- otherwise we do nothing.
2323
local match = false
24+
local testMatch = false
2425
local dotnetRunNeedsSeparator = false;
2526
local dotnetRunInjectionIndex = nil;
2627
local argv = compilerArguments.argv
@@ -50,10 +51,11 @@ function RegisterExtractorPack(id)
5051
end
5152
if arg == 'test' then
5253
match = true
54+
testMatch = true
5355
end
54-
-- for `dotnet [test|run]`, we should not append `-p:UseSharedCompilation=false` to the command line
55-
-- if a library or executable is being provided as an argument.
56-
if arg:match('%.exe$') or arg:match('%.dll') then
56+
-- for `dotnet test`, we should not append `-p:UseSharedCompilation=false` to the command line
57+
-- if an `exe` or `dll` is passed as an argument as the call is forwarded to vstest.
58+
if testMatch and (arg:match('%.exe$') or arg:match('%.dll')) then
5759
match = false
5860
break
5961
end

0 commit comments

Comments
 (0)