Skip to content

Commit

Permalink
Rename RunTests project to HelixTestRunner
Browse files Browse the repository at this point in the history
- less confusing given `RunTests` target and runtests.sh et cetera
  • Loading branch information
dougbu committed Apr 29, 2022
1 parent 9961ccb commit 5b14ca6
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion AspNetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.RateLi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.RateLimiting.Tests", "src\Middleware\RateLimiting\test\Microsoft.AspNetCore.RateLimiting.Tests.csproj", "{41FF4F96-98D2-4482-A2A7-4B179E80D285}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RunTests", "eng\tools\RunTests\RunTests.csproj", "{51D07AA9-6297-4F66-A7BD-71CE7E3F4A3F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelixTestRunner", "eng\tools\HelixTestRunner\HelixTestRunner.csproj", "{51D07AA9-6297-4F66-A7BD-71CE7E3F4A3F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions docs/UpdatingMajorVersionAndTFM.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once dotnet/runtime has updated their TFM, we update ours in the dependency upda

* In [eng/Versions.props](/eng/Versions.props), increment `DefaultNetCoreTargetFramework` by 1.
* Do a global repo search for the current version string, and update almost everything by 1 (e.g. find `net7`, replace with `net8`). See the PR linked above for examples - this shouldn't be done blindly, but on a case-by-case basis. Most things should be updated, and most choices should be obvious.
* Exceptions to this are [eng/tools/RepoTasks/RepoTasks.csproj](/eng/tools/RepoTasks/RepoTasks.csproj), [eng/tools/RepoTasks/RepoTasks.tasks](/eng/tools/RepoTasks/RepoTasks.tasks), and [eng/tools/RunTests/RunTests.csproj](/eng/tools/RunTests/RunTests.csproj). These build without the workarounds from [eng/tools/GenerateFiles/Directory.Build.targets.in](/eng/tools/GenerateFiles/Directory.Build.targets.in), and need to be kept at the previous TFM until we get an SDK containing a runtime with the new TFM. Generally this means we have to hard-code the previous TFM for these files, rather than using `DefaultNetCoreTargetFramework`.
* Exceptions to this are [eng/tools/RepoTasks/RepoTasks.csproj](/eng/tools/RepoTasks/RepoTasks.csproj), [eng/tools/RepoTasks/RepoTasks.tasks](/eng/tools/RepoTasks/RepoTasks.tasks), and [eng/tools/HelixTestRunner/HelixTestRunner.csproj](/eng/tools/HelixTestRunner/HelixTestRunner.csproj). These build without the workarounds from [eng/tools/GenerateFiles/Directory.Build.targets.in](/eng/tools/GenerateFiles/Directory.Build.targets.in), and need to be kept at the previous TFM until we get an SDK containing a runtime with the new TFM. Generally this means we have to hard-code the previous TFM for these files, rather than using `DefaultNetCoreTargetFramework`.
* Add a reference to the new `SiteExtensions` package for the previous Major Version.
1. Add references to [src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj](/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj) to `Microsoft.AspNetCore.AzureAppServices.SiteExtension.{PreviousMajorVersion}.0.x64` and `Microsoft.AspNetCore.AzureAppServices.SiteExtension.{PreviousMajorVersion}.0.x86`.
2. Add entries in [eng/Versions.props](/eng/Versions.props) similar to [these](https://github.com/dotnet/aspnetcore/blob/216c92b78bce31d5e81a70b589707ec2ae5ab21a/eng/Versions.props#L224-L226) - the version should be from the latest released build of .Net.
Expand All @@ -56,4 +56,4 @@ Once dotnet/runtime has updated their TFM, we update ours in the dependency upda

## Ingesting an SDK with the new TFM

Typically we update the SDK we use in `main` every Monday. Once we have one that contains `Microsoft.Netcore.App` entries with the new TFM, we can update [eng/tools/RepoTasks/RepoTasks.csproj](/eng/tools/RepoTasks/RepoTasks.csproj), [eng/tools/RepoTasks/RepoTasks.tasks](/eng/tools/RepoTasks/RepoTasks.tasks), and [eng/tools/RunTests/RunTests.csproj](/eng/helix/tools/RunTests.csproj) to use `DefaultNetCoreTargetFramework` again rather than hard-coding the previous TFM.
Typically we update the SDK we use in `main` every Monday. Once we have one that contains `Microsoft.Netcore.App` entries with the new TFM, we can update [eng/tools/RepoTasks/RepoTasks.csproj](/eng/tools/RepoTasks/RepoTasks.csproj), [eng/tools/RepoTasks/RepoTasks.tasks](/eng/tools/RepoTasks/RepoTasks.tasks), and [eng/tools/HelixTestRunner/HelixTestRunner.csproj](/eng/helix/tools/HelixTestRunner.csproj) to use `DefaultNetCoreTargetFramework` again rather than hard-coding the previous TFM.
2 changes: 1 addition & 1 deletion eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
$(RepoRoot)src\Extensions\**\*.csproj;
$(RepoRoot)src\BuildAfterTargetingPack\*.csproj;
$(RepoRoot)src\OpenApi\**\*.csproj;
$(RepoRoot)eng\tools\RunTests\RunTests.csproj;
$(RepoRoot)eng\tools\HelixTestRunner\HelixTestRunner.csproj;
"
Exclude="
@(ProjectToBuild);
Expand Down
4 changes: 2 additions & 2 deletions eng/helix/content/runtests.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ echo.

set exit_code=0

echo "Running tests: $HELIX_CORRELATION_PAYLOAD/RunTests/RunTests.exe --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright $installPlaywright"
$HELIX_CORRELATION_PAYLOAD/RunTests/RunTests.exe --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright $installPlaywright
echo "Running tests: $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.exe --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright $installPlaywright"
$HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.exe --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --helixTimeout %$helixTimeout% --playwright $installPlaywright
if not errorlevel 0 (
set exit_code=%errorlevel%
)
Expand Down
4 changes: 2 additions & 2 deletions eng/helix/content/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ sync

exit_code=0

echo "Running tests: dotnet run $HELIX_CORRELATION_PAYLOAD/RunTests/RunTests.dll -- --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright"
dotnet run $HELIX_CORRELATION_PAYLOAD/RunTests/RunTests.dll -- --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright
echo "Running tests: dotnet run $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll -- --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright"
dotnet run $HELIX_CORRELATION_PAYLOAD/HelixTestRunner/HelixTestRunner.dll -- --target $1 --runtime $2 --queue $helixQueue --arch $4 --quarantined $5 --helixTimeout $6 --playwright $installPlaywright
exit_code=$?
echo "Finished tests...exit_code=$exit_code"

Expand Down
8 changes: 4 additions & 4 deletions eng/helix/helix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
<PackageType>runtime</PackageType>
</AdditionalDotNetPackage>

<!-- Grab the tool packages for what RunTests installs. -->
<!-- Grab the tool packages for what HelixTestRunner installs. -->
<HelixCorrelationPayload Include="$(NUGET_PACKAGES)\dotnet-dump\$(DotnetDumpVersion)\dotnet-dump.$(DotnetDumpVersion).nupkg" />
<HelixCorrelationPayload Include="$(NUGET_PACKAGES)\dotnet-ef\$(dotnetefVersion)\dotnet-ef.$(dotnetefVersion).nupkg" />
<HelixCorrelationPayload Include="$(NUGET_PACKAGES)\dotnet-serve\$(DotnetServeVersion)\dotnet-serve.$(DotnetServeVersion).nupkg" />

<!-- Grab published `RunTests` project output. -->
<HelixCorrelationPayload Include="$(ArtifactsBinDir)RunTests\Debug\net7.0\publish\"
Destination="$([MSBuild]::EnsureTrailingSlash('RunTests')" />
<!-- Grab published `HelixTestRunner` project output. -->
<HelixCorrelationPayload Include="$(ArtifactsBinDir)HelixTestRunner\Debug\net7.0\publish\"
Destination="$([MSBuild]::EnsureTrailingSlash('HelixTestRunner')" />
</ItemGroup>

<Choose>
Expand Down
6 changes: 3 additions & 3 deletions eng/targets/Helix.targets
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" />

<!--
Use the shared framework and ref/ assemblies copied to the Helix agents and expanded by RunTests. Unfortunately,
tests of Microsoft.NET.Sdk.Web templates will not reference the just-built Microsoft.NET.Sdk.Razor. Adding a
package reference for that would confuse tests of Microsoft.NET.Sdk templates.
Use the shared framework and ref/ assemblies copied to the Helix agents and expanded by HelixTestRunner.
Unfortunately, tests of Microsoft.NET.Sdk.Web templates will not reference the just-built
Microsoft.NET.Sdk.Razor. Adding a package reference for that would confuse tests of Microsoft.NET.Sdk templates.
-->
<Copy SourceFiles="$(ArtifactsBinDir)GenerateFiles\Directory.Build.props"
DestinationFiles="$(PublishDir)Directory.Build.props"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace RunTests;
namespace HelixTestRunner;

public class RunTestsOptions
public class HelixTestRunnerOptions
{
public static RunTestsOptions Parse(string[] args)
public static HelixTestRunnerOptions Parse(string[] args)
{
var command = new RootCommand()
{
Expand Down Expand Up @@ -60,7 +60,7 @@ public static RunTestsOptions Parse(string[] args)

var parseResult = command.Parse(args);
var sharedFxVersion = parseResult.ValueForOption<string>("--runtime");
var options = new RunTestsOptions
var options = new HelixTestRunnerOptions
{
Architecture = parseResult.ValueForOption<string>("--arch"),
HelixQueue = parseResult.ValueForOption<string>("--queue"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace RunTests;
namespace HelixTestRunner;

public class ProcessResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#nullable enable

namespace RunTests;
namespace HelixTestRunner;

public static class ProcessUtil
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System;
using System.Threading.Tasks;

namespace RunTests;
namespace HelixTestRunner;

class Program
{
static async Task Main(string[] args)
{
try
{
var runner = new TestRunner(RunTestsOptions.Parse(args));
var runner = new TestRunner(HelixTestRunnerOptions.Parse(args));

var keepGoing = runner.SetupEnvironment();
if (keepGoing)
Expand Down Expand Up @@ -54,7 +54,7 @@ static async Task Main(string[] args)
}
catch (Exception e)
{
Console.WriteLine($"RunTests uncaught exception: {e.ToString()}");
Console.WriteLine($"HelixTestRunner uncaught exception: {e.ToString()}");
Environment.Exit(1);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace RunTests;
namespace HelixTestRunner;

public class TestRunner
{
public TestRunner(RunTestsOptions options)
public TestRunner(HelixTestRunnerOptions options)
{
Options = options;
EnvironmentVariables = new Dictionary<string, string>();
}

public RunTestsOptions Options { get; set; }
public HelixTestRunnerOptions Options { get; set; }
public Dictionary<string, string> EnvironmentVariables { get; set; }

public bool SetupEnvironment()
Expand Down Expand Up @@ -262,7 +262,7 @@ public async Task<int> RunTestsAsync()
}
catch (Exception e)
{
Console.WriteLine($"Exception in RunTests: {e}");
Console.WriteLine($"Exception in HelixTestRunner: {e}");
exitCode = 1;
}
return exitCode;
Expand Down
4 changes: 2 additions & 2 deletions eng/tools/tools.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projects": [
"eng\\tools\\BaselineGenerator\\BaselineGenerator.csproj",
"eng\\tools\\RepoTasks\\RepoTasks.csproj",
"eng\\tools\\RunTests\\RunTests.csproj"
"eng\\tools\\HelixTestRunner\\HelixTestRunner.csproj"
]
}
}
}

0 comments on commit 5b14ca6

Please sign in to comment.