Stage WinAppDriver into its own folder (#15953)

WinAppDriver depends on a bunch of .NET assemblies that collide *big time*. Let's just quarantine it.

I kept the fallback to $TESTDIR\WinAppDriver.exe because there's a chance that the Windows build depends on it.
This commit is contained in:
Dustin L. Howett 2023-09-15 12:59:00 -07:00 committed by GitHub
parent 4bc34e490c
commit 2fa8e766bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View File

@ -22,7 +22,12 @@ namespace Host.Tests.UIA
public static void SetupAll(TestContext context)
{
Log.Comment("Searching for WinAppDriver in the same directory where this test was launched from...");
string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe");
string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver", "WinAppDriver.exe");
if (!File.Exists(winAppDriver))
{
winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe");
}
Log.Comment($"Attempting to launch WinAppDriver at: {winAppDriver}");
Log.Comment($"Working directory: {Environment.CurrentDirectory}");

View File

@ -126,7 +126,7 @@
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy &quot;$(SolutionDir)\dep\WinAppDriver\*&quot; &quot;$(OutDir)\&quot;</PostBuildEvent>
<PostBuildEvent>mkdir &quot;$(OutDir)\WinAppDriver&quot; 2&gt;nul &amp; copy &quot;$(SolutionDir)\dep\WinAppDriver\*&quot; &quot;$(OutDir)\WinAppDriver\&quot;</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\common.nugetversions.targets" />
</Project>

View File

@ -149,7 +149,7 @@
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(SolutionDir)\dep\WinAppDriver\*" "$(OutDir)\"</PostBuildEvent>
<PostBuildEvent>mkdir &quot;$(OutDir)\WinAppDriver&quot; 2&gt;nul &amp; copy &quot;$(SolutionDir)\dep\WinAppDriver\*&quot; &quot;$(OutDir)\WinAppDriver\&quot;</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\common.nugetversions.targets" />
</Project>

View File

@ -28,7 +28,12 @@ namespace Host.Tests.UIA
public static void SetupAll(TestContext context)
{
Log.Comment("Searching for WinAppDriver in the same directory where this test was launched from...");
string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe");
string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver", "WinAppDriver.exe");
if (!File.Exists(winAppDriver))
{
winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe");
}
Log.Comment($"Attempting to launch WinAppDriver at: {winAppDriver}");
Log.Comment($"Working directory: {Environment.CurrentDirectory}");