Use RepoTools instead of global tools (dotnet/corefx#37858)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 23 May 2019 01:41:45 +0000 (18:41 -0700)
committerGitHub <noreply@github.com>
Thu, 23 May 2019 01:41:45 +0000 (18:41 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/58c30f7413b93f47d332c8ec50a40013c3694791

eng/dotnet-tools.json [new file with mode: 0644]
eng/sendtohelix.proj

diff --git a/eng/dotnet-tools.json b/eng/dotnet-tools.json
new file mode 100644 (file)
index 0000000..63401b9
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "version": 1,
+  "isRoot": true,
+  "tools": {
+    "coverlet.console": {
+      "version": "1.5.1",
+      "commands": [
+        "coverlet"
+      ]
+    },
+    "dotnet-reportgenerator-globaltool": {
+      "version": "4.1.6",
+      "commands": [
+        "reportgenerator"
+      ]
+    }
+  }
+}
\ No newline at end of file
index 54ab043..e44b0af 100644 (file)
     <HelixCommand>$(HelixCommand) /p:LocalPackagesPath="%HELIX_CORRELATION_PAYLOAD%\packages\</HelixCommand>
   </PropertyGroup>
 
-  <!-- Define which workloads require global tools. -->
-  <PropertyGroup Condition="'$(UseGlobalTools)' == ''">
-    <UseGlobalTools Condition="'$(Coverage)' == 'true'">true</UseGlobalTools>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(HelixCommand)' == '' and '$(TargetsWindows)' == 'true'">
+  <PropertyGroup Condition="'$(HelixCommand)' == ''">
     <!--
       For windows we need to use call, since the command is going to be called from a bat script created by Helix
       and we exit /b at the end of RunTests.cmd, Helix runs some other commands after ours within the bat script,
       if we don't use call, then we cause the parent script to exit, and anything after will not be executed.
     -->
-    <HelixCommand>call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD% --dotnet-root %HELIX_CORRELATION_PAYLOAD%</HelixCommand>
-    <HelixCommand Condition="'$(UseGlobalTools)' == 'true'">$(HelixCommand) --global-tools-dir "%HELIX_CORRELATION_PAYLOAD%\tools"</HelixCommand>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(HelixCommand)' == '' and '$(TargetsWindows)' != 'true'">
-    <HelixCommand>./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD" --dotnet-root "$HELIX_CORRELATION_PAYLOAD"</HelixCommand>
-    <HelixCommand Condition="'$(UseGlobalTools)' == 'true'">$(HelixCommand) --global-tools-dir "$HELIX_CORRELATION_PAYLOAD/tools"</HelixCommand>
+    <HelixCommand Condition="'$(TargetsWindows)' == 'true'">call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD% --dotnet-root %HELIX_CORRELATION_PAYLOAD%</HelixCommand>
+    <HelixCommand Condition="'$(TargetsWindows)' != 'true'">./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD" --dotnet-root "$HELIX_CORRELATION_PAYLOAD"</HelixCommand>
   </PropertyGroup>
 
-  <!-- We need to include all dlls in the runtime path as inputs to make it really incremental
-  if we use the root folder, if a dll is updated, the folder's timestamp is not updated, therefore skipped. -->
+  <!--
+    We need to include all dlls in the runtime path as inputs to make it really incremental if we use the root folder,
+    if a dll is updated, the folder's timestamp is not updated, therefore skipped.
+  -->
   <ItemGroup>
     <_RuntimeInputs Include="$(TestHostRootPath)**/*.dll" />
   </ItemGroup>
 
-  <!-- Add global tools to runtime -->
-  <ItemGroup Condition="'$(UseGlobalTools)' == 'true'">
-    <TestArchiveRuntimeDependency Include="$(DotNetRoot)shared\Microsoft.NETCore.App\**\*.*" DestinationDir="shared\Microsoft.NETCore.App" />
-    <TestArchiveRuntimeDependency Include="$(DotNetRoot)host\**\*.*" DestinationDir="host" />
-    <TestArchiveRuntimeDependency Include="$(GlobalToolsDir)**\*.*" DestinationDir="tools" />
-  </ItemGroup>
-
   <Target Name="CompressRuntimeDirectory"
           Inputs="@(_RuntimeInputs);@(TestArchiveRuntimeDependency)"
           Outputs="$(TestArchiveRuntimeFile)"
           Condition="'$(TargetGroup)' != 'AllConfigurations'">
 
-    <!-- Copy additional test dependencies. -->
-    <ItemGroup>
-      <_TestArchiveRuntimeDependency Include="@(TestArchiveRuntimeDependency)">
-        <DestinationDir>%(TestArchiveRuntimeDependency.DestinationDir)\%(RecursiveDir)</DestinationDir>
-      </_TestArchiveRuntimeDependency>
-    </ItemGroup>
-
-    <Copy SourceFiles="@(_TestArchiveRuntimeDependency)"
-          DestinationFiles="@(_TestArchiveRuntimeDependency -> '$([MSBuild]::NormalizePath('$(TestHostRootPath)', '%(DestinationDir)', '%(Filename)%(Extension)'))')"
-          SkipUnchangedFiles="true"
-          OverwriteReadOnlyFiles="true"
-          Retries="3"
-          RetryDelayMilliseconds="300">
-      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
-    </Copy>
-
     <MakeDir Directories="$(TestArchiveRuntimeRoot)" />
-    <ZipDirectory
-        SourceDirectory="$(TestHostRootPath)"
-        DestinationFile="$(TestArchiveRuntimeFile)"
-        Overwrite="true" />
+    <ZipDirectory SourceDirectory="$(TestHostRootPath)"
+                  DestinationFile="$(TestArchiveRuntimeFile)"
+                  Overwrite="true" />
 
   </Target>
 
   <Target Name="BuildHelixWorkItems"
           DependsOnTargets="CompressRuntimeDirectory">
-    <ItemGroup>
 
+    <ItemGroup>
       <HelixCorrelationPayload Include="$(HelixCorrelationPayload)" />
 
       <_WorkItem Include="$(WorkItemArchiveWildCard)" Exclude="$(HelixCorrelationPayload)" />
         <Timeout>$(_timeoutSpan)</Timeout>
       </HelixWorkItem>
     </ItemGroup>
+
   </Target>
 </Project>