Skip to content

Commit b8554be

Browse files
authored
[PERF] Fix "x$PERF_PREREQS_INSTALLED was unexpected at this time" Error 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.
1 parent 8020c89 commit b8554be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eng/testing/performance/microbenchmarks.proj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@
131131
<HelixWorkItem Include="@(Partition)">
132132
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
133133
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands>
134-
<Command>
134+
<Command Condition="'$(AGENT_OS)' != 'Windows_NT'">
135135
if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then
136136
$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)";
137137
else
138138
echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1;
139139
fi</Command>
140+
<Command Condition="'$(AGENT_OS)' == 'Windows_NT'">$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
140141
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands>
141142
<Timeout>$(WorkItemTimeout)</Timeout>
142143
</HelixWorkItem>
@@ -146,12 +147,13 @@
146147
<HelixWorkItem Include="$(BuildConfig).WorkItem">
147148
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
148149
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands>
149-
<Command>
150+
<Command Condition="'$(AGENT_OS)' != 'Windows_NT'">
150151
if [ "x$PERF_PREREQS_INSTALLED" = "x1" ]; then
151152
$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)";
152153
else
153154
echo "\n\n** Error: Failed to install prerequisites **\n\n"; export _commandExitCode=1;
154155
fi</Command>
156+
<Command Condition="'$(AGENT_OS)' == 'Windows_NT'">$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command>
155157
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(PERFLAB_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands>
156158
<Timeout>4:00</Timeout>
157159
</HelixWorkItem>

0 commit comments

Comments
 (0)