summaryrefslogtreecommitdiff
path: root/tests/xunitwrapper.targets
diff options
context:
space:
mode:
authorMatt Mitchell <mmitche@microsoft.com>2015-07-06 16:12:43 -0700
committerMatt Mitchell <mmitche@microsoft.com>2015-07-09 16:20:11 -0700
commit1972ec27c9a570460dde377ff910325b0017507b (patch)
tree7c3aa8f49005bfaa5c6a8742427783aac778e195 /tests/xunitwrapper.targets
parenteed62e377af693f0288587a3600c89e258e614a6 (diff)
downloadcoreclr-1972ec27c9a570460dde377ff910325b0017507b.tar.gz
coreclr-1972ec27c9a570460dde377ff910325b0017507b.tar.bz2
coreclr-1972ec27c9a570460dde377ff910325b0017507b.zip
Move CoreCLR to the modern build tools and dnx
This changes moves coreclr onto DNX (same version as corefx). Theoretically, this should allow these tests to target the desktop CLR. All of the old package.config files are gone and replaced with corresponding project.json files. The up front restore behavior is retained. Tests are now buildable individually, though not runnable in a similar fashion.
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 0000000000..2794d4666b
--- /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" Condition="'$(ResolveNuGetPackages)'=='true'">
+
+ <ResolveNuGetPackageAssets Condition="Exists($(ProjectLockJson))"
+ Architecture="$(PlatformTarget)"
+ Configuration="$(Configuration)"
+ Language="$(Language)"
+ PackageRoot="$(PackagesDir)"
+ ProjectLockFile="$(ProjectLockJson)"
+ TargetFrameworkMonikers="$(NugetTargetFrameworkMoniker)"
+ TargetPlatformMonikers="$(TargetPlatformMoniker)">
+ <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
+ <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
+ <Output TaskParameter="ResolvedCopyLocalItems" ItemName="CopyLocal" />
+ </ResolveNuGetPackageAssets>
+
+ <!-- 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>