Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up argument spacing in CLI calls. Add output path for publish. CoreRT #1955

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

Beau-Gosse-dev
Copy link
Contributor

Previous discussion here: #1951 (and #1952)

This was tested locally by manually pointing dotnet/performance to this code and running a CoreRT benchmark against it.

This fixes 2 different issues:

  1. The architecture flag "-r" didn't have a leading space and therefore was combine with the string in front of it, causing it not to be passed to the dotnet restore/build/publish commands. Would look like this: dotnet restore /p:DebugType=portable -bl:benchmarkdotnet.binlog-r win-x64 /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true and dotnet fails to restore/build/publish

  2. The output directory of CoreRT publishes wasn't specified and if running the test project inside another project seemed to output to the first bin directory found from the root of the drive.

Output path

When benchmarking CoreRT (like from https://github.com/dotnet/performance ) the publish directory ends up being inside of the bin directory of the host console app, and not the sub-directory bin directory of the generated project.

For example when the publish command is this (before this change): start dotnet publish -c Release /p:DebugType=portable -bl:benchmarkdotnet.binlog -r win-x64 --no-build --no-restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true in C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU

Then it will result in this: Executable C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU\bin\Release\net6.0\win-x64\publish\Job-PALSMU.exe not found

because the executable was actually published to C:\Code\Local Spikes\performance\performance\artifacts\bin\BenchmarkDotNet.Autogenerated\Release\net6.0\win-x64\publish

@dnfadmin
Copy link

dnfadmin commented Mar 18, 2022

CLA assistant check
All CLA requirements met.

@Beau-Gosse-dev Beau-Gosse-dev changed the title Cleaning up argument spacing in CLI calls. Add output path for publish. Cleaning up argument spacing in CLI calls. Add output path for publish. CoreRT Mar 19, 2022
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you very much @Beau-Gosse-dev !

src/BenchmarkDotNet/Extensions/StringAndTextExtensions.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants