Set NETCoreAppMaximumVersion to the current version in the branch
authorWes Haggard <Wes.Haggard@microsoft.com>
Fri, 27 Oct 2017 20:11:11 +0000 (13:11 -0700)
committerWes Haggard <Wes.Haggard@microsoft.com>
Fri, 27 Oct 2017 20:21:23 +0000 (13:21 -0700)
Commit migrated from https://github.com/dotnet/core-setup/commit/3aa233dbd06b542aa62453d1de341dfcc25e15a8

src/installer/BranchInfo.props
src/installer/TestProjects.props [new file with mode: 0644]
src/installer/test/TestUtils/RepoDirectoriesProvider.cs
src/installer/test/TestUtils/TestProjectFixture.cs
src/installer/test/dir.proj

index 8f2b802..543d410 100644 (file)
@@ -11,5 +11,6 @@
     <BranchName>master</BranchName>
     <ContainerName>dotnet</ContainerName>
     <ChecksumContainerName>$(ContainerName)</ChecksumContainerName>
+    <NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
   </PropertyGroup>
 </Project>
diff --git a/src/installer/TestProjects.props b/src/installer/TestProjects.props
new file mode 100644 (file)
index 0000000..72f1451
--- /dev/null
@@ -0,0 +1,3 @@
+<Project>
+  <Import Project="BranchInfo.props" />
+</Project>
\ No newline at end of file
index 1ad4c56..88f5f57 100644 (file)
@@ -46,7 +46,7 @@ namespace Microsoft.DotNet.CoreSetup.Test
             _repoRoot = repoRoot ?? GetRepoRootDirectory();
 
             string baseArtifactsFolder = artifacts ?? Path.Combine(_repoRoot, "Bin");
-            
+
             _targetRID = Environment.GetEnvironmentVariable("TEST_TARGETRID");
             _buildRID = Environment.GetEnvironmentVariable("BUILDRID");
             _buildArchitecture = Environment.GetEnvironmentVariable("BUILD_ARCHITECTURE");
index dd80488..bcf2932 100644 (file)
@@ -2,6 +2,7 @@ using Microsoft.DotNet.Cli.Build;
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Text;
 
 namespace Microsoft.DotNet.CoreSetup.Test
 {
@@ -162,9 +163,15 @@ namespace Microsoft.DotNet.CoreSetup.Test
             {
                 try
                 {
+                    StringBuilder propsFile = new StringBuilder();
+
+                    propsFile.AppendLine("<Project>");
+                    propsFile.AppendLine("  <Import Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), TestProjects.props))\\TestProjects.props\" />");
+                    propsFile.AppendLine("</Project>");
+
                     // write an empty Directory.Build.props to ensure that msbuild doesn't pick up
                     // the repo's root Directory.Build.props.
-                    File.WriteAllText(directoryBuildPropsPath, "<Project></Project>");
+                    File.WriteAllText(directoryBuildPropsPath, propsFile.ToString());
                 }
                 catch (IOException)
                 {}
index 83e9403..e1d0626 100644 (file)
@@ -13,7 +13,7 @@
   </PropertyGroup>
 
   <Target Name="Build" DependsOnTargets="$(BuildTestTargets)" />
-  
+
   <Target Name="DetermineTestOutputDirectory">
     <GetTargetMachineInfo>
       <Output TaskParameter="RuntimeIdentifier" PropertyName="_HostRid" />
@@ -37,7 +37,7 @@
     <ItemGroup>
       <DirsToClean Include="$(TestDir)\**\bin" />
       <DirsToClean Include="$(TestDir)\**\obj" />
-      <DirsToClean Include="$(TempFolderRoot)$(TargetArchitecture)" />  
+      <DirsToClean Include="$(TempFolderRoot)$(TargetArchitecture)" />
     </ItemGroup>
 
     <RemoveDir Directories="@(DirsToClean)" />
@@ -79,9 +79,9 @@
       <TestWorkingDirectory>$([System.IO.Path]::GetDirectoryName($(TestProject)))</TestWorkingDirectory>
       <DirectorySeparatorChar>$([System.IO.Path]::DirectorySeparatorChar)</DirectorySeparatorChar>
       <!-- The tests use the TEST_ARTIFACTS env variable to determine the artifacts folder and then later compare that path to its expected path.
-           So, the TEST_ARTIFACTS variable has to have system specific path separators or the string compoarison will fail. -->   
-      <SystemPathTestsOutputDir>$([System.String]::Copy('$(TestsOutputDir)').Replace('/', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>   
-      <SystemPathTestsOutputDir>$([System.String]::Copy('$(SystemPathTestsOutputDir)').Replace('\', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>   
+           So, the TEST_ARTIFACTS variable has to have system specific path separators or the string compoarison will fail. -->
+      <SystemPathTestsOutputDir>$([System.String]::Copy('$(TestsOutputDir)').Replace('/', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
+      <SystemPathTestsOutputDir>$([System.String]::Copy('$(SystemPathTestsOutputDir)').Replace('\', '$(DirectorySeparatorChar)'))</SystemPathTestsOutputDir>
     </PropertyGroup>
     <PropertyGroup>
       <TestArgs>--no-restore $(MSBuildPassThroughPropertyList)</TestArgs>
       </FailedTests>
     </ItemGroup>
     <Message Importance="High" Condition="'@(FailedTests)' != ''" Text="Failed test summary" />
-    <Message Importance="High" Condition="'@(FailedTests)' != ''" Text="  %(FailedTests.Identity) failed with exit code %(FailedTests.ExitCode), see %(FailedTests.ResultsXml)" />      
+    <Message Importance="High" Condition="'@(FailedTests)' != ''" Text="  %(FailedTests.Identity) failed with exit code %(FailedTests.ExitCode), see %(FailedTests.ResultsXml)" />
     <Error Condition="'@(FailedTests)' != ''" Text="One or more test runs failed." />
   </Target>