Fix incremental build restore: move generated test_runtime project.json to bin (...
authorDavis Goodin <dagood@users.noreply.github.com>
Mon, 9 May 2016 13:20:55 +0000 (08:20 -0500)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 9 May 2016 13:20:55 +0000 (15:20 +0200)
* Move generated test_runtime project.json to bin.

* Update helix tasks to point to moved test_runtime files.

* Remove unnecessary TestRuntimeDependenciesJson property.

tests/dir.props
tests/helix.targets
tests/helixperftasks.targets
tests/runtest.proj
tests/src/Common/test_runtime/test_runtime.csproj
tests/src/dir.common.props

index 088d510..c456700 100644 (file)
 
   <!-- Create a collection of all project.json files for dependency updates. -->
   <ItemGroup>
-    <!-- Skip validation of the test_runtime project created by the test build. -->
-    <ProjectJsonFiles Include="$(SourceDir)**\project.json"
-                      Exclude="$(SourceDir)Common\test_runtime\project.json" />
+    <ProjectJsonFiles Include="$(SourceDir)**\project.json" />
   </ItemGroup>
 
   <!-- Which tests shall we build? Default: Priority 0 tests.
index 187ba94..36b1431 100644 (file)
@@ -25,6 +25,7 @@
     </PropertyGroup>
     <ItemGroup>
       <TestNugetProjectLockFile Include="$(SourceDir)$(Category)\**\project.lock.json"/>
+      <TestNugetProjectLockFile Include="$(TestRuntimeProjectLockJson)"/>
     </ItemGroup>
   </Target>
 
index c28cc13..73046cf 100644 (file)
       <Output TaskParameter="PerfTestAssemblies" ItemName="CoreCLRPerfTest" />
     </GetPerfTestAssemblies>
 
-    <PropertyGroup>
-      <TestRuntimeDependenciesJson>$(SourceDir)Common\test_runtime\project.json</TestRuntimeDependenciesJson>
-      <TestRuntimeProjectLockJson>$(SourceDir)Common\test_runtime\project.lock.json</TestRuntimeProjectLockJson>
-    </PropertyGroup>
-
     <ItemGroup>
      <DnuSourceList Include="$(CORE_ROOT)\.nuget\pkg" />
     </ItemGroup>
 
     <!-- Restore the runtime dependencies -->
-    <Exec Command="$(DnuRestoreCommand) &quot;$(TestRuntimeDependenciesJson)&quot;"
+    <Exec Command="$(DnuRestoreCommand) &quot;$(TestRuntimeProjectJson)&quot;"
            StandardOutputImportance="Low"
            CustomErrorRegularExpression="^Unable to resolve .*"
            IgnoreExitCode="true"
index 7bace14..01f7fb1 100644 (file)
@@ -382,9 +382,11 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
       </TestRuntimeJsonContents>
     </PropertyGroup>
 
+    <MakeDir Directories="$(TestRuntimeProjectJsonDir)" Condition="!Exists('$(TestRuntimeProjectJsonDir)')" />
+
     <!-- Write the file -->
     <WriteLinesToFile
-      File="src\Common\test_runtime\project.json"
+      File="$(TestRuntimeProjectJson)"
       Lines="$(TestRuntimeJsonContents)"
       Overwrite="true" />
 
index 9374e36..0416083 100644 (file)
@@ -12,7 +12,7 @@
      <DnuSourceList Include="$(CORE_ROOT)\.nuget\pkg" /> 
   </ItemGroup>
   <ItemGroup>
-    <None Include="project.json" />
+    <None Include="$(TestRuntimeProjectJson)" />
   </ItemGroup>
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
   <Target Name="Build" /> 
index 4cc833b..f1700f5 100644 (file)
     <TestPath Condition="'$(TestPath)'==''">$(TestWorkingDir)$(OSPlatformConfig)\$(MSBuildProjectName)/</TestPath>
   </PropertyGroup>
 
+  <!-- Setup the output location for the project.json generated for the local CoreCLR build. -->
+  <PropertyGroup>
+    <TestRuntimeProjectJsonDir>$(BaseOutputPath)\test_runtime</TestRuntimeProjectJsonDir>
+    <TestRuntimeProjectJson>$(TestRuntimeProjectJsonDir)\project.json</TestRuntimeProjectJson>
+    <TestRuntimeProjectLockJson>$(TestRuntimeProjectJsonDir)\project.lock.json</TestRuntimeProjectLockJson>
+  </PropertyGroup>
+
   <!-- Default priority building values. -->
   <PropertyGroup>
     <CLRTestKind Condition="'$(CLRTestKind)' == ' '">BuildAndRun</CLRTestKind>