Skip to content

Commit

Permalink
Update the test infra to account for the test app having a different …
Browse files Browse the repository at this point in the history
…name when built from the inner loop solution. (#3359)
  • Loading branch information
StephenLPeters authored Oct 30, 2020
1 parent da3964e commit f503466
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/testinfra/MUXTestInfra/Infra/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ public static TestApplicationInfo MUXControlsTestApp
}
}

public static TestApplicationInfo MUXControlsInnerLoopTestApp
{
get
{
#if USING_TAEF
string testAppName = "MUXControlsInnerLoopTestApp_8wekyb3d8bbwe!taef.executionengine.universal.App";
#else
string testAppName = "MUXControlsInnerLoopTestApp_8wekyb3d8bbwe!App";
#endif
return new TestApplicationInfo("MUXControlsTestApp", testAppName, "MUXControlsInnerLoopTestApp_8wekyb3d8bbwe", "MUXControlsInnerLoopTestApp", "MUXControlsTestApp", "MUXControlsTestApp", MUXCertSerialNumber, MUXBaseAppxDir);
}
}

public static TestApplicationInfo NugetPackageTestApp
{
get
Expand Down Expand Up @@ -197,7 +210,11 @@ public static void AssemblyInitialize(TestContext testContext, string certFileNa

public static void AssemblyCleanup()
{
#if INNERLOOP_BUILD
AssemblyCleanupWorker(TestApplicationInfo.MUXControlsInnerLoopTestApp);
#else
AssemblyCleanupWorker(TestApplicationInfo.MUXControlsTestApp);
#endif
}

public static void AssemblyCleanupWorker(TestApplicationInfo testAppInfo)
Expand Down Expand Up @@ -233,7 +250,11 @@ private static Application CreateApplication(TestApplicationInfo info)

public static void Initialize(TestContext testContext)
{
#if INNERLOOP_BUILD
Initialize(testContext, TestApplicationInfo.MUXControlsInnerLoopTestApp);
#else
Initialize(testContext, TestApplicationInfo.MUXControlsTestApp);
#endif
}

// Tests classes call this from their ClassInitialize methods to init our Application instance
Expand Down
2 changes: 2 additions & 0 deletions test/testinfra/MUXTestInfra/MSTest/MUXTestInfra.MSTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>

<DefineConstants Condition="$(SolutionName) == 'MUXControlsInnerLoop'">$(DefineConstants);INNERLOOP_BUILD</DefineConstants>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions test/testinfra/MUXTestInfra/TAEF/MUXTestInfra.TAEF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>

<DefineConstants>$(DefineConstants);USING_TAEF</DefineConstants>
<DefineConstants Condition="$(SolutionName) == 'MUXControlsInnerLoop'">$(DefineConstants);INNERLOOP_BUILD</DefineConstants>

<TaefRootDirectory>$(NuGetPackageRoot)taef.redist.wlk\10.31.180822002\build\Binaries\x86\CoreClr\</TaefRootDirectory>
</PropertyGroup>
Expand Down

0 comments on commit f503466

Please sign in to comment.