Skip to content

Commit b3aee8c

Browse files
committed
Revert "Reenable framework unit tests on helix (#19975)"
This reverts commit 9a792f2.
1 parent b29f1fa commit b3aee8c

File tree

9 files changed

+14
-89
lines changed

9 files changed

+14
-89
lines changed

eng/helix/content/InstallAppRuntime.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
3030

3131
Set-StrictMode -Version 1
3232

33+
Write-Host "Extracting to $InstallDir"
34+
3335
$zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip")
3436
Write-Host "Renaming to $zipPackage"
3537
Rename-Item -Path $AppRuntimePath -NewName $zipPackage
@@ -44,9 +46,8 @@ else {
4446
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime")
4547
}
4648

47-
New-Item -ItemType Directory -Force -Path $InstallDir
48-
Write-Host "Copying *.txt to $InstallDir"
49-
Copy-Item -Path ".\tmpRuntime\*.txt" $InstallDir
49+
Get-ChildItem -Path ".\tmpRuntime" -Recurse
50+
5051
Write-Host "Copying managed files to $InstallDir"
5152
Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir
5253
Write-Host "Copying native files to $InstallDir"

eng/helix/content/InstallAspNetRef.ps1

Lines changed: 0 additions & 40 deletions
This file was deleted.

eng/helix/content/RunTests/TestRunner.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,25 @@ public bool SetupEnvironment()
6565
}
6666
}
6767

68-
public void DisplayContents(string path = "./")
68+
public void DisplayContents()
6969
{
7070
try
7171
{
7272
Console.WriteLine();
73-
Console.WriteLine($"Displaying directory contents for {path}:");
74-
foreach (var file in Directory.EnumerateFiles(path))
73+
Console.WriteLine("Displaying directory contents:");
74+
foreach (var file in Directory.EnumerateFiles("./"))
7575
{
7676
Console.WriteLine(Path.GetFileName(file));
7777
}
78-
foreach (var file in Directory.EnumerateDirectories(path))
78+
foreach (var file in Directory.EnumerateDirectories("./"))
7979
{
8080
Console.WriteLine(Path.GetFileName(file));
8181
}
8282
Console.WriteLine();
8383
}
8484
catch (Exception e)
8585
{
86-
Console.WriteLine($"Exception in DisplayContents: {e.ToString()}");
86+
Console.WriteLine($"Exception in DisplayInitialState: {e.ToString()}");
8787
}
8888
}
8989

@@ -95,17 +95,11 @@ public async Task<bool> InstallAspNetAppIfNeededAsync()
9595
if (Directory.Exists("Microsoft.AspNetCore.App"))
9696
{
9797
var appRuntimePath = $"{Options.DotnetRoot}/shared/Microsoft.AspNetCore.App/{Options.RuntimeVersion}";
98-
Console.WriteLine($"Creating directory: {appRuntimePath}");
99-
Directory.CreateDirectory(appRuntimePath);
10098
Console.WriteLine($"Found Microsoft.AspNetCore.App/, copying to {appRuntimePath}");
101-
Console.WriteLine($"Set ASPNET_RUNTIME_PATH: {appRuntimePath}");
102-
EnvironmentVariables.Add("ASPNET_RUNTIME_PATH", appRuntimePath);
10399
foreach (var file in Directory.EnumerateFiles("Microsoft.AspNetCore.App", "*.*", SearchOption.AllDirectories))
104100
{
105-
File.Copy(file, Path.Combine(appRuntimePath, Path.GetFileName(file)), overwrite: true);
101+
File.Copy(file, Path.Combine(appRuntimePath, file), overwrite: true);
106102
}
107-
108-
DisplayContents(appRuntimePath);
109103

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

eng/helix/content/installappruntime.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ mkdir -p $tmpDir
1616
unzip sharedFx.zip -d $tmpDir
1717
mkdir -p $output_dir
1818
echo "Copying to $output_dir"
19-
cp $tmpDir/*.txt $output_dir
2019
cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir
2120
cp $tmpDir/runtimes/$rid/native/* $output_dir

eng/helix/content/installaspnetref.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

eng/targets/Helix.targets

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@
1616
<HelixPreCommand Include="call RunPowershell.cmd InstallNode.ps1 $(NodeVersion) %25HELIX_CORRELATION_PAYLOAD%25\node\bin || exit /b 1" />
1717
</ItemGroup>
1818

19-
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
20-
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
21-
<HelixPreCommand Include="call RunPowershell.cmd InstallAspNetRef.ps1 Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
22-
</ItemGroup>
23-
24-
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'false' AND '$(TestDependsOnAspNetRef)' == 'true' AND '$(IsTargetingPackBuilding)' == 'true'">
25-
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg" />
26-
<HelixPreCommand Include="./installaspnetref.sh Microsoft.AspNetCore.App.Ref.$(AppRuntimeVersion).nupkg Microsoft.AspNetCore.App.Ref || exit /b 1" />
27-
</ItemGroup>
28-
2919
<ItemGroup Condition="'$(IsHelixJob)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TestDependsOnAspNetRuntime)' == 'true'">
3020
<HelixContent Include="$(RepoRoot)artifacts\packages\Release\Shipping\Microsoft.AspNetCore.App.Runtime.win-x64.$(AppRuntimeVersion).nupkg" />
3121
<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" />

src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<PropertyGroup>
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<RootNamespace>Microsoft.AspNetCore</RootNamespace>
6+
<!-- https://github.com/dotnet/aspnetcore/issues/7939: This unit test requires the shared framework be available in Helix. -->
7+
<BuildHelixPayload>false</BuildHelixPayload>
68
<VerifyAncmBinary Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'">true</VerifyAncmBinary>
7-
<TestDependsOnAspNetRuntime>true</TestDependsOnAspNetRuntime>
8-
<TestDependsOnAspNetRef>true</TestDependsOnAspNetRef>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/Framework/test/SharedFxTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ public SharedFxTests(ITestOutputHelper output)
2323
_output = output;
2424
_expectedTfm = "netcoreapp" + TestData.GetSharedFxVersion().Substring(0, 3);
2525
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
26-
_sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
27-
? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", TestData.GetTestDataValue("RuntimePackageVersion"))
28-
: Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH");
26+
_sharedFxRoot = Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion"));
2927
}
3028

3129
[Fact]

src/Framework/test/TargetingPackTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ public TargetingPackTests(ITestOutputHelper output)
2626
{
2727
_output = output;
2828
_expectedRid = TestData.GetSharedFxRuntimeIdentifier();
29-
_targetingPackRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))
30-
? Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"))
31-
: Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "Microsoft.AspNetCore.App.Ref");
29+
_targetingPackRoot = Path.Combine(TestData.GetTestDataValue("TargetingPackLayoutRoot"), "packs", "Microsoft.AspNetCore.App.Ref", TestData.GetTestDataValue("TargetingPackVersion"));
3230
_isTargetingPackBuilding = bool.Parse(TestData.GetTestDataValue("IsTargetingPackBuilding"));
3331
}
3432

0 commit comments

Comments
 (0)