Skip to content

Commit

Permalink
C#: Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnebel committed Jun 8, 2023
1 parent f9c890b commit 65e6515
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions csharp/tools/tracing-config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function RegisterExtractorPack(id)
-- if that's `build`, we append `-p:UseSharedCompilation=false` to the command line,
-- otherwise we do nothing.
local match = false
local testMatch = false
local dotnetRunNeedsSeparator = false;
local dotnetRunInjectionIndex = nil;
local argv = compilerArguments.argv
Expand Down Expand Up @@ -50,10 +51,11 @@ function RegisterExtractorPack(id)
end
if arg == 'test' then
match = true
testMatch = true
end
-- for `dotnet [test|run]`, we should not append `-p:UseSharedCompilation=false` to the command line
-- if a library or executable is being provided as an argument.
if arg:match('%.exe$') or arg:match('%.dll') then
-- for `dotnet test`, we should not append `-p:UseSharedCompilation=false` to the command line
-- if an `exe` or `dll` is passed as an argument as the call is forwarded to vstest.
if testMatch and (arg:match('%.exe$') or arg:match('%.dll')) then
match = false
break
end
Expand Down

0 comments on commit 65e6515

Please sign in to comment.