Skip to content

Commit 4fa9b7a

Browse files
committed
remove summary on help
1 parent 02e4ac7 commit 4fa9b7a

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"profiles": {
33
"dotnet": {
4-
"commandName": "Project"
4+
"commandName": "Project",
5+
"commandLineArgs": "test --help",
6+
"workingDirectory": "S:\\t\\mstest216",
7+
"environmentVariables": {
8+
"DOTNET_CLI_TESTINGPLATFORM_ENABLE": "1"
9+
},
10+
"hotReloadEnabled": false
511
}
612
}
7-
}
13+
}

src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal partial class TestingPlatformCommand : CliCommand, ICustomHelp
2020
private MSBuildConnectionHandler _msBuildConnectionHandler;
2121
private TestModulesFilterHandler _testModulesFilterHandler;
2222
private TerminalTestReporter _output;
23+
private bool _isHelp;
2324
private TestApplicationActionQueue _actionQueue;
2425
private Task _namedPipeConnectionLoop;
2526
private List<string> _args;
@@ -77,10 +78,11 @@ public int Run(ParseResult parseResult)
7778
ShowAssemblyStartAndComplete = true,
7879
});
7980
_output = output;
80-
_output.TestExecutionStarted(DateTimeOffset.Now, degreeOfParallelism, _isDiscovery);
8181

82+
_isHelp = false;
8283
if (ContainsHelpOption(parseResult.GetArguments()))
8384
{
85+
_isHelp = true;
8486
_actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
8587
{
8688
testApp.HelpRequested += OnHelpRequested;
@@ -90,12 +92,13 @@ public int Run(ParseResult parseResult)
9092
testApp.ExecutionIdReceived += OnExecutionIdReceived;
9193

9294
var result = await testApp.RunAsync(filterModeEnabled, enableHelp: true, builtInOptions);
93-
CompleteRun();
9495
return result;
9596
});
9697
}
9798
else
9899
{
100+
_output.TestExecutionStarted(DateTimeOffset.Now, degreeOfParallelism, _isDiscovery);
101+
99102
_actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
100103
{
101104
testApp.HandshakeReceived += OnHandshakeReceived;
@@ -165,7 +168,10 @@ private void CompleteRun()
165168
{
166169
if (Interlocked.CompareExchange(ref _cancelled, 1, 0) == 0)
167170
{
168-
_output?.TestExecutionCompleted(DateTimeOffset.Now);
171+
if (!_isHelp)
172+
{
173+
_output?.TestExecutionCompleted(DateTimeOffset.Now);
174+
}
169175
}
170176
}
171177

0 commit comments

Comments
 (0)