summaryrefslogtreecommitdiff
path: root/tests/xunitwrapper.targets
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /tests/xunitwrapper.targets
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'tests/xunitwrapper.targets')
-rw-r--r--tests/xunitwrapper.targets61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/xunitwrapper.targets b/tests/xunitwrapper.targets
new file mode 100644
index 0000000..6d5c5e2
--- /dev/null
+++ b/tests/xunitwrapper.targets
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This overrides the typical ResolveNuGetPackages so that it does copy local of the
+ referenced items. This is used so that we can correctly resolve and copy the libraries necessary
+ to the core_root directory -->
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Target Name="ResolveNuGetPackages">
+
+ <PrereleaseResolveNuGetPackageAssets Condition="Exists($(ProjectLockJson))"
+ AllowFallbackOnTargetSelection="true"
+ IncludeFrameworkReferences="false"
+ NuGetPackagesDirectory="$(PackagesDir)"
+ RuntimeIdentifier="dotnet"
+ ProjectLanguage="$(Language)"
+ ProjectLockFile="$(ProjectLockJson)"
+ TargetMonikers="$(TargetFrameworkMoniker)">
+ <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
+ <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
+ <Output TaskParameter="ResolvedCopyLocalItems" ItemName="CopyLocal" />
+ </PrereleaseResolveNuGetPackageAssets>
+
+ <!-- We may have an indirect package reference that we want to replace with a project reference -->
+ <ItemGroup>
+ <!-- Convert to file names so that we can intersect -->
+ <_ProjectReferenceFilenames Include="@(_ResolvedProjectReferencePaths->'%(FileName)%(Extension)')">
+ <OriginalIdentity>%(Identity)</OriginalIdentity>
+ </_ProjectReferenceFilenames>
+
+ <_ReferencesFileNames Include="@(Reference->'%(FileName)%(Extension)')">
+ <OriginalIdentity>%(Identity)</OriginalIdentity>
+ </_ReferencesFileNames>
+
+ <_CopyLocalFileNames Include="@(CopyLocal->'%(FileName)%(Extension)')">
+ <OriginalIdentity>%(Identity)</OriginalIdentity>
+ </_CopyLocalFileNames>
+
+ <!-- Intersect project-refs with package-refs -->
+ <_ReferenceFileNamesToRemove Include="@(_ReferencesFileNames->'%(OriginalIdentity)')" Condition="'@(_ProjectReferenceFilenames)' == '@(_ReferencesFileNames)' and '%(Identity)' != ''"/>
+ <_CopyLocalFileNamesToRemove Include="@(_CopyLocalFileNames->'%(OriginalIdentity)')" Condition="'@(_ProjectReferenceFilenames)' == '@(_CopyLocalFileNames)' and '%(Identity)' != ''"/>
+
+ <Reference Remove="@(_ReferenceFileNamesToRemove)" />
+ <CopyLocal Remove="@(_CopyLocalFileNamesToRemove)"/>
+ </ItemGroup>
+
+ <Message Text="Excluding @(_ReferenceFileNamesToRemove);@(_CopyLocalFileNamesToRemove) from package references since the same file is provided by a project reference."
+ Condition="'@(_ReferenceFileNamesToRemove)' != '' or '@(_CopyLocalFileNamesToRemove)' != ''"/>
+
+ <Copy
+ SourceFiles="@(CopyLocal)"
+ DestinationFolder="$(OutDir)"
+ SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
+ OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+ Retries="$(CopyRetryCount)"
+ RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
+ UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
+
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
+ </Copy>
+
+ </Target>
+</Project>