summaryrefslogtreecommitdiff
path: root/tests/build.proj
diff options
context:
space:
mode:
authorDavis Goodin <dagood@microsoft.com>2016-03-02 19:31:29 -0600
committerDavis Goodin <dagood@microsoft.com>2016-03-10 09:18:15 -0600
commit899d4270b510f5edd1242def8d201b1804dd7683 (patch)
tree4cc4bd48c14b788cef6ab067e6323282cad99ed3 /tests/build.proj
parent2325dea4efa87fc658cb566454e4955f7269ddf6 (diff)
downloadcoreclr-899d4270b510f5edd1242def8d201b1804dd7683.tar.gz
coreclr-899d4270b510f5edd1242def8d201b1804dd7683.tar.bz2
coreclr-899d4270b510f5edd1242def8d201b1804dd7683.zip
Add validation to test build.
Don't validate generated files, and make the xunit.runner.msbuild workaround only apply to that specific package.
Diffstat (limited to 'tests/build.proj')
-rw-r--r--tests/build.proj32
1 files changed, 29 insertions, 3 deletions
diff --git a/tests/build.proj b/tests/build.proj
index ca3896d2ea..70029f19e3 100644
--- a/tests/build.proj
+++ b/tests/build.proj
@@ -12,6 +12,7 @@
<PropertyGroup>
<TraversalBuildDependsOn>
+ ValidateAllProjectDependencies;
BatchRestorePackages;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
@@ -22,13 +23,38 @@
<!-- restore all project.jsons in one pass for perf & to avoid concurrency problems -->
<Exec Command="$(DnuRestoreCommand) $(DnuRestoreDirs)"
- StandardOutputImportance="Low"
- CustomErrorRegularExpression="^Unable to locate .*"
- ContinueOnError="WarnAndContinue" />
+ StandardOutputImportance="Low" />
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." />
</Target>
+ <!-- Task from buildtools that validates dependencies contained in project.json files. -->
+ <UsingTask TaskName="ValidateProjectDependencyVersions" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+
+ <Target Name="ValidateAllProjectDependencies"
+ Condition="'$(ValidatePackageVersions)'=='true' and '@(ProjectJsonFiles)'!=''">
+ <ValidateProjectDependencyVersions ProjectJsons="@(ProjectJsonFiles)"
+ ProhibitFloatingDependencies="$(ProhibitFloatingDependencies)"
+ ValidationPatterns="@(ValidationPattern)" />
+ </Target>
+
+ <Target Name="UpdateInvalidPackageVersions">
+ <ValidateProjectDependencyVersions ProjectJsons="@(ProjectJsonFiles)"
+ ProhibitFloatingDependencies="$(ProhibitFloatingDependencies)"
+ ValidationPatterns="@(ValidationPattern)"
+ UpdateInvalidDependencies="true" />
+ </Target>
+
+ <!-- Tasks from buildtools for easy project.json dependency updates -->
+ <UsingTask TaskName="UpdatePackageDependencyVersion" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+
+ <Target Name="UpdatePackageDependencyVersion">
+ <UpdatePackageDependencyVersion ProjectJsons="@(ProjectJsonFiles)"
+ PackageId="$(PackageId)"
+ OldVersion="$(OldVersion)"
+ NewVersion="$(NewVersion)" />
+ </Target>
+
<!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
<Target Name="RestorePackages" DependsOnTargets="BatchRestorePackages" />
</Project>