Skip to content

Commit

Permalink
Architecture test improvement (microsoft#3254)
Browse files Browse the repository at this point in the history
Architecture test improvement
  • Loading branch information
MarcoRossignoli authored Jan 15, 2022
1 parent d40a6c4 commit cecf20c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ public void DOTNET_ROOTS_EnvironmentVariables(bool dotnetRoot, bool dotnetRootX6
}

// Verify switch using csproj
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {projectPath} --framework net6.0 --arch x64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {projectPath} --framework net6.0 --arch x64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

// Verify switch using test container
var buildAssemblyPath = GetAssetFullPath("ArchitectureSwitch.dll", "net6.0");
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {buildAssemblyPath} --framework net6.0 --arch x64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {buildAssemblyPath} --framework net6.0 --arch x64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

void AssertSwitch(string output)
Expand Down Expand Up @@ -185,12 +185,12 @@ public void PrivateX64BuildToGlobalArmInstallation()
Assert.IsTrue(stdOut.Contains("ProcessArchitecture: X64"), "Unexpected ProcessArchitecture");

// Verify switch using csproj
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {projectPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {projectPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

// Verify switch using test container
var buildAssemblyPath = GetAssetFullPath("ArchitectureSwitch.dll", "net6.0");
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {buildAssemblyPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {buildAssemblyPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

void AssertSwitch(string output)
Expand Down Expand Up @@ -240,12 +240,12 @@ public void PrivateX64BuildToDOTNET_ROOTS_EnvironmentVariables(bool dotnetRoot,
}

// Verify switch using csproj
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {projectPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {projectPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

// Verify switch using test container
var buildAssemblyPath = GetAssetFullPath("ArchitectureSwitch.dll", "net6.0");
ExecuteApplication($"{privateX64Installation}/dotnet", $"test {buildAssemblyPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
ExecuteApplication($"{privateX64Installation}/{GetMuxerName}", $"test {buildAssemblyPath} --framework net6.0 --arch arm64", out stdOut, out stdError, out exitCode, env, projectDirectory);
AssertSwitch(stdOut);

void AssertSwitch(string output)
Expand Down

0 comments on commit cecf20c

Please sign in to comment.