Skip to content

Commit

Permalink
[libraries] Set and use BinPlaceTestRuntimePack property
Browse files Browse the repository at this point in the history
  • Loading branch information
mdh1418 authored and Steve Pfister committed Apr 10, 2020
1 parent e432bbc commit 002b96b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,7 @@
<ASPNETCoreAppPackageRuntimePath>$(ArtifactsBinDir)pkg\aspnetcoreapp\lib</ASPNETCoreAppPackageRuntimePath>

<TestHostRootPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(BuildSettings)'))</TestHostRootPath>
<NETCoreAppRuntimePackPath>$(ArtifactsBinDir)\lib-runtime-packs</NETCoreAppRuntimePackPath>
<NETCoreAppRuntimePackLibPath>$(NETCoreAppRuntimePackPath)\lib</NETCoreAppRuntimePackLibPath>
<NETCoreAppRuntimePackNativePath>$(NETCoreAppRuntimePackPath)\native</NETCoreAppRuntimePackNativePath>
<NETCoreAppRuntimePackNativeIncludePath>$(NETCoreAppRuntimePackNativePath)\include</NETCoreAppRuntimePackNativeIncludePath>
<NETCoreAppRuntimePackNativeCrossPath>$(NETCoreAppRuntimePackNativePath)\cross</NETCoreAppRuntimePackNativeCrossPath>


<VersionFileForPackages Condition="'$(VersionFileForPackages)' == ''">$(ArtifactsObjDir)version.txt</VersionFileForPackages>

Expand Down Expand Up @@ -317,6 +313,15 @@
<TestHostRuntimePath Condition="'$(BinPlaceNETFXRuntime)' == 'true'">$(TestHostRootPath)</TestHostRuntimePath>

<PlatformManifestFile Condition="'$(BinPlaceTestSharedFramework)' == 'true'">$(TestHostRuntimePath)PlatformManifest.txt</PlatformManifestFile>

<!-- Add extra binplacing for the Runtime pack testing framework -->
<BinPlaceTestRuntimePack Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' and ('$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android')">true</BinPlaceTestRuntimePack>

<NETCoreAppRuntimePackPath Condition="'$(BinPlaceTestRuntimePack)' == 'true'">$(ArtifactsBinDir)\lib-runtime-packs</NETCoreAppRuntimePackPath>
<NETCoreAppRuntimePackLibPath Condition="'$(BinPlaceTestRuntimePack)' == 'true'">$(NETCoreAppRuntimePackPath)\lib</NETCoreAppRuntimePackLibPath>
<NETCoreAppRuntimePackNativePath Condition="'$(BinPlaceTestRuntimePack)' == 'true'">$(NETCoreAppRuntimePackPath)\native</NETCoreAppRuntimePackNativePath>
<NETCoreAppRuntimePackNativeIncludePath Condition="'$(BinPlaceTestRuntimePack)' == 'true'">$(NETCoreAppRuntimePackNativePath)\include</NETCoreAppRuntimePackNativeIncludePath>
<NETCoreAppRuntimePackNativeCrossPath Condition="'$(BinPlaceTestRuntimePack)' == 'true'">$(NETCoreAppRuntimePackNativePath)\cross</NETCoreAppRuntimePackNativeCrossPath>
</PropertyGroup>

<ItemGroup Condition="'$(PlatformManifestFile)' != '' and '$(IsTestProject)' == 'true'">
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@
</BinPlaceTargetFrameworks>

<!-- Setup the mobile testing directory -->
<BinPlaceTargetFrameworks Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'" Include="$(NetCoreAppCurrent)-$(TargetOS)" >
<BinPlaceTargetFrameworks Condition="'$(BinPlaceTestRuntimePack)' == 'true'" Include="$(NetCoreAppCurrent)-$(TargetOS)" >
<RuntimePath>$(NETCoreAppRuntimePackLibPath)</RuntimePath>
</BinPlaceTargetFrameworks>

<BinPlaceTargetFrameworks Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'" Include="$(NetCoreAppCurrent)-$(TargetOS)" >
<BinPlaceTargetFrameworks Condition="'$(BinPlaceTestRuntimePack)' == 'true'" Include="$(NetCoreAppCurrent)-$(TargetOS)" >
<RuntimePath>$(NETCoreAppRuntimePackNativePath)</RuntimePath>
<ItemName>BinMobileNative</ItemName>
</BinPlaceTargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Native/native-binplace.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<BinPlaceItem Include="$(NativeBinDir)*.dbg" />
<BinPlaceItem Include="$(NativeBinDir)*.dylib" />
<BinPlaceItem Include="$(NativeBinDir)*.dwarf" />
<BinMobileNative Include="@(BinPlaceItem)" />
<BinMobileNative Condition="'$(BinPlaceTestRuntimePack)' == 'true'" Include="@(BinPlaceItem)" />
<FileWrites Include="@(BinPlaceItem)" />
</ItemGroup>
</Target>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/restore/runtime/runtime.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<Target Name="SetupMobileTesting"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
AfterTargets="AfterResolveReferences"
Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'">
Condition="'$(BinPlaceTestRuntimePack)' == 'true'">

<ItemGroup>
<MobileFile Include="@(RuntimeFiles)" />
Expand Down

0 comments on commit 002b96b

Please sign in to comment.