Skip to content

Commit 1d06f2a

Browse files
committed
fixing packaging and runtests.ps1
1 parent cef0d41 commit 1d06f2a

File tree

5 files changed

+26
-25
lines changed

5 files changed

+26
-25
lines changed

eng/WpfArcadeSdk/tools/CreateTestPayload.targets

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PayloadDrtLocation>$(WpfTestBasePayloadPath)DRT\</PayloadDrtLocation>
1313
<MicrosoftDotNetWpfTestPath>$(ArtifactsPackagingDir)\Microsoft.DotNet.Wpf.GitHub.Test\tools\</MicrosoftDotNetWpfTestPath>
1414
</PropertyGroup>
15-
15+
1616
<!--
1717
Internal repo use only. When we package the infrastructure and DRTs over to dotnet-wpf-int. Allow that repo to add
1818
more DRTs to run.
@@ -22,22 +22,20 @@
2222
<!-- List of DRTs to include that come from dotnet/wpf -->
2323
<Import Project="$(WpfArcadeSdkToolsDir)DrtsToRun.props"/>
2424

25-
<Choose>
26-
<When Condition="!Exists('$(MicrosoftDotNetWpfTestPath)')">
27-
<!-- Building in the external branch, we need to reference the test package-->
28-
<ItemGroup>
29-
<PackageReference Include="Microsoft.DotNet.Wpf.GitHub.Test" Version="$(MicrosoftDotNetWpfGitHubTestVersion)" GeneratePathProperty="true" />
30-
</ItemGroup>
31-
32-
<PropertyGroup>
33-
<MicrosoftDotNetWpfTestPath>$(PkgMicrosoft_DotNet_Wpf_GitHub_Test)\tools\</MicrosoftDotNetWpfTestPath>
34-
</PropertyGroup>
35-
</When>
36-
</Choose>
37-
38-
<ItemGroup>
39-
</ItemGroup>
40-
25+
<Choose>
26+
<When Condition="!Exists('$(MicrosoftDotNetWpfTestPath)')">
27+
<!--
28+
Building from internal repo where the test package must be consumed from the nuget package. We can't restore the package here because the Restore
29+
targets aren't run for AfterSolutionBuild.proj. So instead we restore the package in Tools.props. And since only the Restore targets are run for Tools.proj,
30+
the path property to the package isn't generated for us so we can't copy it to a well known location there. Instead we generate the path ourselves using
31+
well known MSBuild properties available to the entire Build.proj project.
32+
-->
33+
<PropertyGroup>
34+
<MicrosoftDotNetWpfTestPath>$(NuGetPackageRoot)\runtime.win-$(Platform).$(MicrosoftDotNetWpfGitHubTestPackage)\$(MicrosoftDotNetWpfGitHubTestVersion)\tools\</MicrosoftDotNetWpfTestPath>
35+
</PropertyGroup>
36+
</When>
37+
</Choose>
38+
4139
<Target Name="CreateTestPayload" BeforeTargets="Test" AfterTargets="Build;CopyPackageAssets">
4240
<ItemGroup>
4341
<MicrosoftDotNetWpfTestContents Include="$(MicrosoftDotNetWpfTestPath)**\*.*" />
@@ -61,3 +59,4 @@
6159
DestinationFiles="@(DrtPayloadContents->'$(PayloadDrtLocation)%(RecursiveDir)%(Filename)%(Extension)')" />
6260
</Target>
6361
</Project>
62+

eng/WpfArcadeSdk/tools/Packaging.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ $(PreparePackageAssetsDependsOn):
282282
<Pack>true</Pack>
283283
<PackagePath>$(LibFolder)</PackagePath>
284284
</Content>
285+
286+
<Content Include="$(ArtifactsPackagingDir)$(NormalizedPackageName)\$(LibFolder)\**\*.json"
287+
Condition="('$(CreateArchNeutralPackage)'!='true' Or '$(IncludeAssembliesInArchNeutralPackage)'== 'true') and Exists('$(ArtifactsPackagingDir)$(NormalizedPackageName)\$(LibFolder)\')" >
288+
<Pack>true</Pack>
289+
<PackagePath>$(LibFolder)</PackagePath>
290+
</Content>
291+
285292
<Content Include="$(ArtifactsPackagingDir)$(NormalizedPackageName)\$(LibFolder)\**\*.pdb"
286293
Condition="('$(CreateArchNeutralPackage)'!='true' Or '$(IncludeAssembliesInArchNeutralPackage)'== 'true') and Exists('$(ArtifactsPackagingDir)$(NormalizedPackageName)\$(LibFolder)\')" >
287294
<Pack>true</Pack>

eng/WpfArcadeSdk/tools/TestProjects.targets

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Include="$(Pkgruntime_win-x64_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
4141
CopyToOutputDirectory="PreserveNewest"/>
4242
<None Condition="'$(RuntimeIdentifier)'=='win-x86'"
43-
Include="$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
43+
Include="$(Pkgruntime_win-x86_Microsoft_DotNet_Wpf_DncEng)\runtimes\$(RuntimeIdentifier)\native\*.dll"
4444
CopyToOutputDirectory="PreserveNewest"/>
4545

4646
<_wpfProjectsNotWindowsBaseNotNative Include="@(WpfProjectPath)" Exclude="WindowsBase;PresentationNative_cor3;WpfGfx_cor3;PenImc_cor3" />
@@ -68,15 +68,12 @@
6868
<OutputItemType>_windowsBaseAssemblyLocallyBuiltPath</OutputItemType>
6969
</ProjectReference>
7070

71-
<!--
72-
ProjectReference to a native project fails from a .csproj
7371
<ProjectReference Include="@(_wpfNativeProjects->'%(ProjectPath)')" >
7472
<Private>True</Private>
7573
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
7674
<OutputItemType>Content</OutputItemType>
7775
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7876
</ProjectReference>
79-
-->
8077
</ItemGroup>
8178

8279
<PropertyGroup Condition="'$(WpfTest)'=='true' or '$(IsTestProject)'=='true'">

eng/WpfArcadeSdk/tools/WpfProjectReference.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@
4242
<WpfProjectPath Include="UIAutomationClient" ProjectPath="$(WpfSourceDir)UIAutomation\UIAutomationClient\UIAutomationClient.csproj" />
4343
<WpfProjectPath Include="UIAutomationClientSideProviders" ProjectPath="$(WpfSourceDir)UIAutomation\UIAutomationClientSideProviders\UIAutomationClientSideProviders.csproj" />
4444

45-
<!--
4645
<WpfProjectPath Include="PresentationNative_cor3" ProjectPath="$(WpfSourceDir)PresentationNative\dll\PresentationNative.vcxproj" />
4746
<WpfProjectPath Include="WpfGfx_cor3" ProjectPath="$(WpfSourceDir)WpfGfx\core\dll\WpfGfx.vcxproj" />
4847
<WpfProjectPath Include="PenImc_cor3" ProjectPath="$(WpfSourceDir)PenImc\dll\PenImc.vcxproj" />
49-
-->
5048
</ItemGroup>
5149

5250
<PropertyGroup>

eng/WpfArcadeSdk/tools/runtests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ $testLocation = Join-Path (Split-Path -Parent $script:MyInvocation.MyCommand.Pat
2424
if (Test-Path "$testLocation\QV.cmd")
2525
{
2626
$args = if ($waitForDebugger) { "/debugtests /waitForDebugger"}
27-
$args += if ($debugSti) { "/debugSti" }
28-
$args += if ($debugQV) { "/debugQV" }
27+
$args += if ($debugSti) { " /debugSti" }
28+
$args += if ($debugQV) { " /debugQV" }
2929
# We invoke QV directly instead of rundrts to prevent the "RunDrtReport" script being generated.
3030
Invoke-Expression "$testLocation\QV.cmd Run /DiscoveryInfoPath=$testLocation\DiscoveryInfoDrts.xml /RunDirectory=$env:AppData\QualityVault\Run $command $args"
3131
}

0 commit comments

Comments
 (0)