Skip to content

Commit

Permalink
[PERF] Fix "x$PERF_PREREQS_INSTALLED was unexpected at this time" Err…
Browse files Browse the repository at this point in the history
…or for Microbenchmarks (#73584)

* Try double brackets.

* Only use the bash check if running on non-windows machine, added command for running on windows machines.

* Undoing changes to if statement brackets (double to single now) as the double bracket is not necessary.

* Use the correct, previously removed command.
  • Loading branch information
LoopedBard3 authored Aug 9, 2022
1 parent 8020c89 commit b8554be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eng/testing/performance/microbenchmarks.proj
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@
<HelixWorkItem Include="@(Partition)">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands>
<Command>
<Command Condition="'$(AGENT_OS)' != 'Windows_NT'">
if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then
$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)";
else
echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1;
fi</Command>
<Command Condition="'$(AGENT_OS)' == 'Windows_NT'">$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands>
<Timeout>$(WorkItemTimeout)</Timeout>
</HelixWorkItem>
Expand All @@ -146,12 +147,13 @@
<HelixWorkItem Include="$(BuildConfig).WorkItem">
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands>
<Command>
<Command Condition="'$(AGENT_OS)' != 'Windows_NT'">
if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then
$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)";
else
echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1;
fi</Command>
<Command Condition="'$(AGENT_OS)' == 'Windows_NT'">$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command>
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands>
<Timeout>4:00</Timeout>
</HelixWorkItem>
Expand Down

0 comments on commit b8554be

Please sign in to comment.