summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRama Krishnan Raghupathy <ramarag@microsoft.com>2015-10-23 14:39:25 -0700
committerRama Krishnan Raghupathy <ramarag@microsoft.com>2015-10-23 17:23:16 -0700
commitf0e0ebc0624e690dcebd0f3d31b36daf7750c295 (patch)
tree2f1f52bce0b95f0b08d06a2f93bba9d8a94b5b94 /tests
parent68764ae2b70a1d84d05d7bcfd4a9296161e6627a (diff)
downloadcoreclr-f0e0ebc0624e690dcebd0f3d31b36daf7750c295.tar.gz
coreclr-f0e0ebc0624e690dcebd0f3d31b36daf7750c295.tar.bz2
coreclr-f0e0ebc0624e690dcebd0f3d31b36daf7750c295.zip
Test Cleanup:
1. Ensures each test has its own unique directory 2. Use Project Reference to refer native CMakeLists.txt 3. Avoids copying the facades to the test build
Diffstat (limited to 'tests')
-rw-r--r--tests/issues.targets5
-rw-r--r--tests/src/Interop/ReversePInvoke/Marshalling/MarshalBoolArray.csproj5
-rw-r--r--tests/src/Loader/NativeLibs/FromNativePaths.csproj3
-rw-r--r--tests/src/dir.common.props2
-rw-r--r--tests/src/dir.targets18
5 files changed, 20 insertions, 13 deletions
diff --git a/tests/issues.targets b/tests/issues.targets
index 3f228860a6..2bb667d851 100644
--- a/tests/issues.targets
+++ b/tests/issues.targets
@@ -1,10 +1,7 @@
<Project DefaultTargets = "GetListOfTestCmds"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<ItemGroup Condition="'$(XunitTestBinBase)' != ''">
- <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\newarr\newarr.cmd" >
- <Issue>1036</Issue>
- </ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\lifetime\lifetime2.cmd" >
+ <ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\lifetime\**\lifetime2.cmd" >
<Issue>1037</Issue>
</ExcludeList>
</ItemGroup>
diff --git a/tests/src/Interop/ReversePInvoke/Marshalling/MarshalBoolArray.csproj b/tests/src/Interop/ReversePInvoke/Marshalling/MarshalBoolArray.csproj
index 701e87c528..71b516610d 100644
--- a/tests/src/Interop/ReversePInvoke/Marshalling/MarshalBoolArray.csproj
+++ b/tests/src/Interop/ReversePInvoke/Marshalling/MarshalBoolArray.csproj
@@ -41,8 +41,7 @@
<Project>{c8c0dc74-fac4-45b1-81fe-70c4808366e0}</Project>
<Name>CoreCLRTestLibrary</Name>
</ProjectReference>
- <ProjectReference Include="CMakeLists.txt">
- </ProjectReference>
+ <ProjectReference Include="CMakeLists.txt" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/tests/src/Loader/NativeLibs/FromNativePaths.csproj b/tests/src/Loader/NativeLibs/FromNativePaths.csproj
index 163b1cde90..ebfbdb352c 100644
--- a/tests/src/Loader/NativeLibs/FromNativePaths.csproj
+++ b/tests/src/Loader/NativeLibs/FromNativePaths.csproj
@@ -19,6 +19,7 @@
</ItemGroup>
<ItemGroup>
<None Include="project.json" />
+ <ProjectReference Include="CMakeLists.txt" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/tests/src/dir.common.props b/tests/src/dir.common.props
index 39ce2c8d07..4f332e41d4 100644
--- a/tests/src/dir.common.props
+++ b/tests/src/dir.common.props
@@ -36,7 +36,7 @@
<BaseIntermediateOutputPath Condition="'$(__ManagedTestIntermediatesDir)' != ''">$(__ManagedTestIntermediatesDir)\</BaseIntermediateOutputPath>
<__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\obj\$(BuildOS).$(Platform).$(Configuration)\))</__NativeTestIntermediatesDir>
<BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir>
- <BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(SourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(SourceDir),''))</BuildProjectRelativeDir>
+ <BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(SourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(SourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)</IntermediateOutputPath>
<OutputPath>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutputPath>
</PropertyGroup>
diff --git a/tests/src/dir.targets b/tests/src/dir.targets
index 8579131257..20ce3fe066 100644
--- a/tests/src/dir.targets
+++ b/tests/src/dir.targets
@@ -134,19 +134,29 @@
</Target>
<Target Name="ConsolidateNativeProjectReference"
- Condition="'@(ProjectReference)' != ''"
+ Condition="'@(NativeProjectReferenceNormalized)' != ''"
BeforeTargets="Build" >
<ItemGroup>
<NativeProjectOutputFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(SourceDir),$(__NativeTestIntermediatesDir)\src\))$(Configuration)\"/>
</ItemGroup>
- <Message Text= "Project files are :$([System.String]::Copy(%(ProjectReference.FileName)).ToUpper()) " />
- <Message Text= "Project references are :%(ProjectReference.Identity)" />
- <Message Text= "Native project references are :%(NativeProjectReference.Identity)" />
<Message Text= "Full native project references are :%(NativeProjectReferenceNormalized.Identity)" />
<Message Text= "Native binaries will be copied from :%(NativeProjectOutputFoldersToCopy.Identity)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CopyNativeProjectBinaries" Properties="NativeProjectOutputFolder=%(NativeProjectOutputFoldersToCopy.Identity)" Condition="'@(NativeProjectReference)' != ''" />
</Target>
+
+ <PropertyGroup>
+ <PrepareForRunDependsOn>$(PrepareForRunDependsOn);ResetReferenceCopyLocalPaths</PrepareForRunDependsOn>
+ </PropertyGroup>
+
+ <Target Name="ResetReferenceCopyLocalPaths"
+ Condition="'@(ReferenceCopyLocalPaths)' != ''"
+ BeforeTargets="_CopyFilesMarkedCopyLocal">
+ <ItemGroup>
+ <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.CopyLocal)' != 'true'"/>
+ </ItemGroup>
+ </Target>
+
</Project>