Skip to content

Commit

Permalink
Keep generated files when MSBuild bin log is requested (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik authored Feb 13, 2023
1 parent 615384d commit d3fbc03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ private static IConfig CreateConfig(CommandLineOptions options, IConfig globalCo
config.WithOption(ConfigOptions.ApplesToApples, options.ApplesToApples);
config.WithOption(ConfigOptions.Resume, options.Resume);

if (config.Options.IsSet(ConfigOptions.GenerateMSBuildBinLog))
config.Options |= ConfigOptions.KeepBenchmarkFiles;

if (options.MaxParameterColumnWidth.HasValue)
config.WithSummaryStyle(SummaryStyle.Default.WithMaxParameterColumnWidth(options.MaxParameterColumnWidth.Value));

Expand Down
2 changes: 1 addition & 1 deletion tests/BenchmarkDotNet.Tests/ConfigParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void DotNetCliParsedCorrectly(string tfm)
[InlineData(ConfigOptions.StopOnFirstError, "--stopOnFirstError")]
[InlineData(ConfigOptions.DisableLogFile, "--disableLogFile" )]
[InlineData(ConfigOptions.LogBuildOutput, "--logBuildOutput")]
[InlineData(ConfigOptions.GenerateMSBuildBinLog, "--generateBinLog")]
[InlineData(ConfigOptions.GenerateMSBuildBinLog | ConfigOptions.KeepBenchmarkFiles, "--generateBinLog")]
[InlineData(
ConfigOptions.JoinSummary |
ConfigOptions.KeepBenchmarkFiles |
Expand Down

0 comments on commit d3fbc03

Please sign in to comment.