Skip to content

Commit 4f873f6

Browse files
committed
Pass dotnetEfVersion in Helix test runner
1 parent 8d157a1 commit 4f873f6

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

eng/helix/content/runtests.cmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set $arch=%4
99
set $quarantined=%5
1010
set $helixTimeout=%6
1111
set $installPlaywright=%7
12+
set $dotnetEfVersion=%8
1213
REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more
1314

1415
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
@@ -24,8 +25,8 @@ echo.
2425

2526
set exit_code=0
2627

27-
echo "Running tests: dotnet %HELIX_CORRELATION_PAYLOAD%/HelixTestRunner/HelixTestRunner.dll --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright %$installPlaywright%"
28-
dotnet %HELIX_CORRELATION_PAYLOAD%/HelixTestRunner/HelixTestRunner.dll --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright %$installPlaywright%
28+
echo "Running tests: dotnet %HELIX_CORRELATION_PAYLOAD%/HelixTestRunner/HelixTestRunner.dll --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright %$installPlaywright% --dotnetEf %$dotnetEfVersion%"
29+
dotnet %HELIX_CORRELATION_PAYLOAD%/HelixTestRunner/HelixTestRunner.dll --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright %$installPlaywright% --dotnetEf %$dotnetEfVersion%
2930
if not errorlevel 0 (
3031
set exit_code=%errorlevel%
3132
)

eng/helix/content/runtests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ sync
7878

7979
exit_code=0
8080

81-
echo "Running tests: dotnet $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright"
82-
dotnet $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright
81+
echo "Running tests: dotnet $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright --dotnetEf $8"
82+
dotnet $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright --dotnetEf $8
8383
exit_code=$?
8484
echo "Finished tests...exit_code=$exit_code"
8585

eng/targets/Helix.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@
221221
When the targeting pack builds, it has exactly the same version as the shared framework. Passing
222222
SharedFxVersion because that's needed even when the targeting pack isn't building.
223223
-->
224-
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(_TestingArchitecture) $(RunQuarantinedTests) $(HelixTimeout) $(TestDependsOnPlaywright)</Command>
225-
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(_TestingArchitecture) $(RunQuarantinedTests) $(HelixTimeout) $(TestDependsOnPlaywright)</Command>
224+
<Command Condition="$(IsWindowsHelixQueue)">call runtests.cmd $(TargetFileName) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(_TestingArchitecture) $(RunQuarantinedTests) $(HelixTimeout) $(TestDependsOnPlaywright) $(DotnetEfVersion)</Command>
225+
<Command Condition="!$(IsWindowsHelixQueue)">./runtests.sh $(TargetFileName) $(SharedFxVersion) $(_HelixFriendlyNameTargetQueue) $(_TestingArchitecture) $(RunQuarantinedTests) $(HelixTimeout) $(TestDependsOnPlaywright) $(DotnetEfVersion)</Command>
226226
<Command Condition="'$(HelixCommand)' != ''">$(HelixCommand)</Command>
227227
<Timeout>$(HelixTimeout)</Timeout>
228228
</HelixWorkItem>

eng/tools/HelixTestRunner/HelixTestRunnerOptions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,25 @@ public static HelixTestRunnerOptions Parse(string[] args)
5555
new Option(
5656
aliases: new string[] { "--source" },
5757
description: "The restore sources to use during testing")
58-
{ Argument = new Argument<string>() { Arity = ArgumentArity.ZeroOrMore }, Required = true }
58+
{ Argument = new Argument<string>() { Arity = ArgumentArity.ZeroOrMore }, Required = true },
59+
60+
new Option(
61+
aliases: new string[] { "--dotnetEf" },
62+
description: "The version of the dotnet-ef tool being installed and used")
63+
{ Argument = new Argument<string>(), Required = true }
5964
};
6065

6166
var parseResult = command.Parse(args);
6267
var sharedFxVersion = parseResult.ValueForOption<string>("--runtime");
68+
var dotnetEfVersion = parseResult.ValueForOption<string>("--dotnetEf");
6369
var options = new HelixTestRunnerOptions
6470
{
6571
Architecture = parseResult.ValueForOption<string>("--arch"),
6672
HelixQueue = parseResult.ValueForOption<string>("--queue"),
6773
InstallPlaywright = parseResult.ValueForOption<bool>("--playwright"),
6874
Quarantined = parseResult.ValueForOption<bool>("--quarantined"),
6975
RuntimeVersion = sharedFxVersion,
76+
DotnetEfVersion = dotnetEfVersion,
7077
Target = parseResult.ValueForOption<string>("--target"),
7178
Timeout = TimeSpan.Parse(parseResult.ValueForOption<string>("--helixTimeout"), CultureInfo.InvariantCulture),
7279

@@ -87,6 +94,7 @@ public static HelixTestRunnerOptions Parse(string[] args)
8794
public bool InstallPlaywright { get; private set; }
8895
public bool Quarantined { get; private set; }
8996
public string RuntimeVersion { get; private set; }
97+
public string DotnetEfVersion { get; private set; }
9098
public string Target { get; private set; }
9199
public TimeSpan Timeout { get; private set; }
92100

eng/tools/HelixTestRunner/TestRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
134134
cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token);
135135

136136
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
137-
$"tool install dotnet-ef --tool-path {Options.HELIX_WORKITEM_ROOT} --add-source {correlationPayload}",
137+
$"tool install dotnet-ef --tool-path {Options.HELIX_WORKITEM_ROOT} --add-source {correlationPayload} --version {Options.DotnetEfVersion}",
138138
environmentVariables: EnvironmentVariables,
139139
outputDataReceived: ProcessUtil.PrintMessage,
140140
errorDataReceived: ProcessUtil.PrintErrorMessage,

0 commit comments

Comments
 (0)