Skip to content

Revert "Reenable framework unit tests on helix (#19975)" #20657

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

Merged
1 commit merged into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions eng/helix/content/InstallAppRuntime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138

Set-StrictMode -Version 1

Write-Host "Extracting to $InstallDir"

$zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip")
Write-Host "Renaming to $zipPackage"
Rename-Item -Path $AppRuntimePath -NewName $zipPackage
Expand All @@ -44,9 +46,8 @@ else {
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime")
}

New-Item -ItemType Directory -Force -Path $InstallDir
Write-Host "Copying *.txt to $InstallDir"
Copy-Item -Path ".\tmpRuntime\*.txt" $InstallDir
Get-ChildItem -Path ".\tmpRuntime" -Recurse

Write-Host "Copying managed files to $InstallDir"
Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir
Write-Host "Copying native files to $InstallDir"
Expand Down
40 changes: 0 additions & 40 deletions eng/helix/content/InstallAspNetRef.ps1

This file was deleted.

18 changes: 6 additions & 12 deletions eng/helix/content/RunTests/TestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,25 @@ public bool SetupEnvironment()
}
}

public void DisplayContents(string path = "./")
public void DisplayContents()
{
try
{
Console.WriteLine();
Console.WriteLine($"Displaying directory contents for {path}:");
foreach (var file in Directory.EnumerateFiles(path))
Console.WriteLine("Displaying directory contents:");
foreach (var file in Directory.EnumerateFiles("./"))
{
Console.WriteLine(Path.GetFileName(file));
}
foreach (var file in Directory.EnumerateDirectories(path))
foreach (var file in Directory.EnumerateDirectories("./"))
{
Console.WriteLine(Path.GetFileName(file));
}
Console.WriteLine();
}
catch (Exception e)
{
Console.WriteLine($"Exception in DisplayContents: {e.ToString()}");
Console.WriteLine($"Exception in DisplayInitialState: {e.ToString()}");
}
}

Expand All @@ -95,17 +95,11 @@ public async Task<bool> InstallAspNetAppIfNeededAsync()
if (Directory.Exists("Microsoft.AspNetCore.App"))
{
var appRuntimePath = $"{Options.DotnetRoot}/shared/Microsoft.AspNetCore.App/{Options.RuntimeVersion}";
Console.WriteLine($"Creating directory: {appRuntimePath}");
Directory.CreateDirectory(appRuntimePath);
Console.WriteLine($"Found Microsoft.AspNetCore.App/, copying to {appRuntimePath}");
Console.WriteLine($"Set ASPNET_RUNTIME_PATH: {appRuntimePath}");
EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath);
foreach (var file in Directory.EnumerateFiles("Microsoft.AspNetCore.App", "*.*", SearchOption.AllDirectories))
{
File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file)), overwrite: true);
File.Copy(file, Path.Combine(appRuntimePath, file), overwrite: true);
}

DisplayContents(appRuntimePath);

Console.WriteLine($"Adding current directory to nuget sources: {Options.HELIX_WORKITEM_ROOT}");

Expand Down
1 change: 0 additions & 1 deletion eng/helix/content/installappruntime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ mkdir -p $tmpDir
unzip sharedFx.zip -d $tmpDir
mkdir -p $output_dir
echo "Copying to $output_dir"
cp $tmpDir/*.txt $output_dir
cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir
cp $tmpDir/runtimes/$rid/native/* $output_dir
15 changes: 0 additions & 15 deletions eng/helix/content/installaspnetref.sh

This file was deleted.

10 changes: 0 additions & 10 deletions eng/targets/Helix.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
<HelixPreCommand Include="call RunPowershell.cmd InstallNode.ps1 $(NodeVersion) %25HELIX_CORRELATION_PAYLOAD%25\node\bin || exit /b 1" />
</ItemGroup>

<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
<HelixPreCommand Include="call RunPowershell.cmd InstallAspNetRef.ps1 Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
</ItemGroup>

<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'false' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
<HelixPreCommand Include="./installaspnetref.sh Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
</ItemGroup>

<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRuntime)' == 'true'">
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg" />
<HelixPreCommand Include="call RunPowershell.cmd InstallAppRuntime.ps1 Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App netcoreapp5.0 win-x64 || exit /b 1" />
Expand Down
4 changes: 2 additions & 2 deletions src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<RootNamespace>Microsoft.AspNetCore</RootNamespace>
<!-- https://github.com/dotnet/aspnetcore/issues/7939: This unit test requires the shared framework be available in Helix. -->
<BuildHelixPayload>false</BuildHelixPayload>
<VerifyAncmBinary Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'">true</VerifyAncmBinary>
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
<TestDependsOnAspNetRef>true</TestDependsOnAspNetRef>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/Framework/test/SharedFxTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public SharedFxTests(ITestOutputHelper output)
_output = output;
_expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
_sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", TestData.GetTestDataValue("RuntimePackageVersion"))
: Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH");
_sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion"));
}

[Fact]
Expand Down
4 changes: 1 addition & 3 deletions src/Framework/test/TargetingPackTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ public TargetingPackTests(ITestOutputHelper output)
{
_output = output;
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
_targetingPackRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))
? Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"))
: Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "Microsoft.AspNetCore.App.Ref");
_targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"));
_isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding"));
}

Expand Down