Skip to content

Commit 0f89920

Browse files
committed
don't exit for pretty printing
1 parent baaaae0 commit 0f89920

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/CodeQLToolkit.Core/ver.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.15
1+
0.0.16

src/CodeQLToolkit.Features.Test/Commands/Targets/ValidateUnitTestsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public override void Run()
129129

130130
var failedTests = unitTestResults.Select(x=>x).Where(x=>x.pass==false).ToArray();
131131

132-
if (failedTests.Length > 0)
132+
if (failedTests.Length > 0 && !PrettyPrint)
133133
{
134134
DieWithError("One or more failures during run unit tests.");
135135
}

src/CodeQLToolkit.Features.Test/Commands/TestCommandFeature.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void Register(Command parentCommand)
6767
var validateUnitTestsCommand = new Command("validate-unit-tests", "Validates a unit test run in a fashion suitable for use in CI/CD systems.");
6868

6969
var resultsDirectoryOption = new Option<string>("--results-directory", "Where to find the intermediate execution output files.") { IsRequired = true };
70-
var prettyPrintOption = new Option<bool>("--pretty-print", () => false, "Pretty print test output in a compact format.") { IsRequired = true };
70+
var prettyPrintOption = new Option<bool>("--pretty-print", () => false, "Pretty print test output in a compact format. Note this will not exit with a failure code if tests fail.") { IsRequired = true };
7171

7272
validateUnitTestsCommand.Add(resultsDirectoryOption);
7373
validateUnitTestsCommand.Add(prettyPrintOption);

0 commit comments

Comments
 (0)