From 157bc72fe8394a23d1153ae05e764ec46e2196d5 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Sat, 17 Nov 2018 13:13:23 +0100 Subject: [PATCH] [tests] fix msbuild tests (#4450) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [tests] fix msbuild tests those tests are failing sice the move to SDK-style project for Xaml.UnitTests * [Build] Copy xaml.unittests artifacts * [build] Xaml.UnitTests lives in the debug/net47 foder --- Xamarin.Forms.Xaml.UnitTests/MSBuild/MSBuildTests.cs | 2 +- build/steps/build-windows-test.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Xamarin.Forms.Xaml.UnitTests/MSBuild/MSBuildTests.cs b/Xamarin.Forms.Xaml.UnitTests/MSBuild/MSBuildTests.cs index 45a7cd21c..96a0aad2a 100644 --- a/Xamarin.Forms.Xaml.UnitTests/MSBuild/MSBuildTests.cs +++ b/Xamarin.Forms.Xaml.UnitTests/MSBuild/MSBuildTests.cs @@ -67,7 +67,7 @@ namespace Xamarin.Forms.Xaml.UnitTests Directory.CreateDirectory (tempDirectory); //We need to copy Xamarin.Forms.targets to the test directory, to reliably import them - var xamarinFormsTargets = Path.Combine (testDirectory, "..", "..", "..", ".nuspec", XamarinFormsTargets); + var xamarinFormsTargets = Path.Combine (testDirectory, "..", "..", "..", "..", ".nuspec", XamarinFormsTargets); if (!File.Exists (xamarinFormsTargets)) { //NOTE: VSTS may be running tests in a staging directory, so we can use an environment variable to find the source // https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions/build/variables?view=vsts&tabs=batch#buildsourcesdirectory diff --git a/build/steps/build-windows-test.yml b/build/steps/build-windows-test.yml index df8f989b9..f917502ba 100644 --- a/build/steps/build-windows-test.yml +++ b/build/steps/build-windows-test.yml @@ -3,7 +3,9 @@ steps: displayName: 'Download build artifact win_build' inputs: downloadType: specific - itemPattern: '**/*.UnitTests/bin/$(BuildConfiguration)/*' + itemPattern: | + **/*.UnitTests/bin/$(BuildConfiguration)/* + **/*.Xaml.UnitTests/bin/$(BuildConfiguration)/**/* downloadPath: '$(Build.BinariesDirectory)' parallelizationLimit: 20 @@ -23,7 +25,7 @@ steps: testAssemblyVer2: | **/bin/$(BuildConfiguration)/Xamarin.Forms.Core.UnitTests.dll **/bin/$(BuildConfiguration)/Xamarin.Forms.Pages.UnitTests.dll - **/bin/$(BuildConfiguration)/Xamarin.Forms.Xaml.UnitTests.dll + **/bin/$(BuildConfiguration)/**/Xamarin.Forms.Xaml.UnitTests.dll searchFolder: '$(Build.BinariesDirectory)' pathtoCustomTestAdapters: '$(Build.BinariesDirectory)/testadapters/' codeCoverageEnabled: true