summaryrefslogtreecommitdiff
path: root/tests/runtest.proj
diff options
context:
space:
mode:
authorRahul Kumar <rahku@microsoft.com>2016-02-25 17:13:49 -0800
committerRahul Kumar <rahku@microsoft.com>2016-02-28 15:33:56 -0800
commitd39c8a145ced54a4ffdcec75180e7e843ab85760 (patch)
tree95e0368bc2f3c57d65acfb3a0337ad5c9d08f3a4 /tests/runtest.proj
parent65bc50c6fa07750154ab3aa2adeef811bfb2d948 (diff)
downloadcoreclr-d39c8a145ced54a4ffdcec75180e7e843ab85760.tar.gz
coreclr-d39c8a145ced54a4ffdcec75180e7e843ab85760.tar.bz2
coreclr-d39c8a145ced54a4ffdcec75180e7e843ab85760.zip
remove hack to copy currently built runtime.
Instead add dependency to currently built runtime package
Diffstat (limited to 'tests/runtest.proj')
-rw-r--r--tests/runtest.proj48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/runtest.proj b/tests/runtest.proj
index 2e458a56ff..33507aead0 100644
--- a/tests/runtest.proj
+++ b/tests/runtest.proj
@@ -315,7 +315,55 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
Targets="CopyDependecyToCoreRoot"/>
</Target>
+ <!-- All the test projects need to add dependency to currently built runtime as they require that to run.
+ In addition the version number of built runtime can change so all project.json needs to be dynamically generated.
+ In order to avoid regenerating project.json for all the tests projects...I added a common project for all the tests.
+ This project is at tests\src\common\test_runtime\test_runtime.csproj. This project is adding common dependencies to
+ all the tests like dependency on Microsoft.netcore.runtime.coreclr ..etc. Project.json for this project is dynamically
+ generated via task CreateTestRuntimeJsonFile. -->
+ <Target Name="CreateTestRuntimeJsonFile">
+ <ItemGroup>
+ <CoreclrPackage Include="$(CORE_ROOT)\.nuget\**\Microsoft.NETCore.Runtime.CoreCLR.*.nupkg"/>
+ </ItemGroup>
+ <PropertyGroup>
+ <CoreclrPackageFileName>%(CoreclrPackage.Filename)</CoreclrPackageFileName>
+ <!-- Get package version number from nuget package filename at core_root -->
+ <CoreclrPackageVersion>$([System.String]::Copy('$(CoreclrPackageFileName)').Replace('Microsoft.NETCore.Runtime.CoreCLR.',''))</CoreclrPackageVersion>
+ <TestRuntimeJsonContents>
+ <![CDATA[
+{
+ "dependencies": {
+ "Microsoft.NETCore.Runtime.CoreCLR": "$(CoreclrPackageVersion)",
+ "Microsoft.NETCore.TestHost": "1.0.0-rc2-23816",
+ },
+ "frameworks": {
+ "dnxcore50": {}
+ }
+}
+
+ ]]>
+ </TestRuntimeJsonContents>
+ </PropertyGroup>
+
+ <!-- Write the file -->
+ <WriteLinesToFile
+ File="src\Common\test_runtime\project.json"
+ Lines="$(TestRuntimeJsonContents)"
+ Overwrite="true" />
+
+ </Target>
+
<Target Name="Build">
+
+ <!-- generate project.json for runtime dependency -->
+ <MSBuild Projects="$(MSBuildProjectFile)"
+ Targets="CreateTestRuntimeJsonFile"
+ Condition=" '$(NoBuild)'!='true' " />
+
+ <!-- generate project.lock.json file corresponding to above json file -->
+ <MSBuild Projects="src\Common\test_runtime\test_runtime.csproj"
+ Condition=" '$(NoBuild)'!='true' " />
+
<!-- Default for building -->
<MSBuild Projects="$(MSBuildProjectFile)"
Targets="CreateAllWrappers"