Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthik Rajasekaran <karajas@microsoft.com>2016-10-25 01:10:40 +0300
committerKarthik Rajasekaran <karajas@microsoft.com>2016-12-12 22:05:34 +0300
commit1fd0ce0834978d4a1ffe52b9a2c0b0fdb52ec475 (patch)
treee7f152e56b691d76505d02d730669e45903f98dc /build.proj
parent00f504792ad0f929e9beeb08844755df6b8cb9bc (diff)
Enable build tests against packages as the default testing scenario
Currently we build and test in CI differently from the official pipeline. This change will help reduce inconsistencies in the way in which we build to expose issues sooner. The build will now build the product as packages, install them locally, restore the test-runtime deps for the locally built versions and then test them. The locally built packages are installed to the localpackages folder and the LKG set restored goes into the packages folder. Tests will only restore against locally built packages as a source and then copy the required LKG dependencies like specific runtime dependencies that aren't built locally. The localpackages are overwritten each time a build occurs so that only one version remains in the folder. Other changes required to make this work: - Add missing runtimes in the supports clause - Add LKG runtime packages not produced by the build
Diffstat (limited to 'build.proj')
-rw-r--r--build.proj30
1 files changed, 18 insertions, 12 deletions
diff --git a/build.proj b/build.proj
index 3c8afeb525..1944cea93d 100644
--- a/build.proj
+++ b/build.proj
@@ -77,35 +77,41 @@
</TraversalBuildDependsOn>
</PropertyGroup>
+ <!-- Create a collection of all project.json files for dependency updates. -->
+ <ItemGroup>
+ <ProjectJsonFiles Condition="'$(ExcludeNonTestRestores)' != 'true'" Include="$(SourceDir)**/project.json" />
+ <ProjectJsonFiles Condition="'$(ExcludeNonTestRestores)' != 'true'" Include="$(ProjectDir)pkg/**/project.json" />
+ <ProjectJsonFiles Include="$(MSBuildThisFileDirectory)layout/**/project.json" />
+ <!-- Additional generated ProjectJsonFiles are added in the build.proj target AddGeneratedProjectJsons -->
+ </ItemGroup>
+
<ItemGroup>
<TestProjectJsons Include="$(MSBuildThisFileDirectory)src/Common/test-runtime/project.json" />
</ItemGroup>
<UsingTask TaskName="GatherDirectoriesToRestore" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
-
- <!-- Create a collection of all project.json files for dependency updates. -->
- <ItemGroup>
- <ProjectJsonFiles Include="$(SourceDir)**/project.json" />
- <ProjectJsonFiles Include="$(MSBuildThisFileDirectory)pkg/**/project.json" />
+
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)layout/**/project.json" />
- <ProjectJsonFiles Condition="'$(BuildTestsAgainstPackages)' == 'true'" Include="$(GeneratedProjectJsonDir)/**/project.json" />
- </ItemGroup>
-
<Target Name="BatchRestorePackages" DependsOnTargets="AddGeneratedProjectJsons;VerifyDependencies">
<MakeDir Directories="$(PackagesDir)" Condition="!Exists('$(PackagesDir)')" />
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." />
-
+<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] KARTHIKDEBUG '$(PackagesDir)'" />
<IsRestoreRequired ProjectJsons="@(ProjectJsonFiles)" PackagesFolder="$(PackagesDir)">
<Output TaskParameter="RestoreRequired" PropertyName="RestoreRequired" />
</IsRestoreRequired>
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] $(DnuRestoreCommand) @(TestProjectJsons->'&quot;%(Identity)&quot;', ' ')" />
+
<!-- This is to restore the test-runtime project.json up front which contains the latest packages to be tested to avoid download contention within nuget. -->
<Exec Command="$(DnuRestoreCommand) @(TestProjectJsons->'&quot;%(Identity)&quot;', ' ')"
- Condition="'$(RestoreRequired)' == 'true'"
+ Condition="'$(RestoreRequired)' == 'true' and '$(BuildTestsAgainstPackages)' != 'true'"
StandardOutputImportance="Low"
CustomErrorRegularExpression="(^Unable to locate .*)|(^Updating the invalid lock file with .*)"
ContinueOnError="ErrorAndContinue" />
+
+ <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] $(DnuRestoreCommand) @(DnuRestoreDir->'&quot;%(Identity)&quot;', ' ')" />
+
<Exec Command="$(DnuRestoreCommand) @(DnuRestoreDir->'&quot;%(Identity)&quot;', ' ')"
Condition="'$(RestoreRequired)' == 'true'"
@@ -138,14 +144,14 @@
<_PackagesDropsForCommonProjectJson Include="$(PackagesDrops)" />
</ItemGroup>
- <AddDependenciesToProjectJson AdditionalDependencies="@(ExternalDependencies)"
+ <AddDependenciesToProjectJson AdditionalDependencies="@(_InjectProjectReferenceDependency)"
PackagesDrops="@(_PackagesDropsForCommonProjectJson)"
PackageNameRegex="$(PackageNameRegex)"
VersionsFiles="@(_VersionsFiles)"
ProjectJson="$(CommonTestProjectJson)"
OutputProjectJson="$(CommonOutputTestProjectJson)"
UseNewestAvailablePackages="$(UseNewestAvailablePackages)"
- />
+ />
</Target>
<!-- Evaluate our test projects (in src\tests.builds) -->