From 1fe02ef7f8511b333e3f7e2cd87979738fe25362 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 20 Mar 2017 12:42:40 +0000 Subject: [PATCH 1/2] [Xamarin.Android.Build.Tests] Move tests into a Shared Project so they can be reused upstream. Rather than have all the msbuild tests in an assembly this commit moves them into a shared project. This means the source code for the tests can be easily reused upstream. It also means we can make use of things like partial classes to change the tests depending on which repo we are running them from. For example having tests in this repo only run in Release mode but have both Release and Debug upstream. --- Xamarin.Android.sln | 5 ++++ ...marin.Android.Build.Tests.Shared.projitems | 26 +++++++++++++++++++ .../Xamarin.Android.Build.Tests.Shared.shproj | 11 ++++++++ .../Xamarin.Android.Build.Tests.csproj | 14 +--------- 4 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.projitems create mode 100644 src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.shproj diff --git a/Xamarin.Android.sln b/Xamarin.Android.sln index 5825300b3b6..11f1a5c61d4 100644 --- a/Xamarin.Android.sln +++ b/Xamarin.Android.sln @@ -105,12 +105,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Tools.Javad EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "javadoc2mdoc", "tools\javadoc2mdoc\javadoc2mdoc.csproj", "{A87352E6-CE7F-4346-B6B1-586AE931C0A7}" EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Xamarin.Android.Build.Tests.Shared", "src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\Xamarin.Android.Build.Tests.Shared.shproj", "{BD1D66BF-5AC7-4926-8EBE-B2198A112EB0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|AnyCPU = Debug|AnyCPU Release|AnyCPU = Release|AnyCPU XAIntegrationDebug|AnyCPU = XAIntegrationDebug|AnyCPU XAIntegrationRelease|AnyCPU = XAIntegrationRelease|AnyCPU + XAIntegrationDebug|Any CPU = XAIntegrationDebug|Any CPU + XAIntegrationRelease|Any CPU = XAIntegrationRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU @@ -537,6 +541,7 @@ Global {8A6CB07C-E493-4A4F-AB94-038645A27118} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62} {E0890301-F75F-40E7-B008-54C28B3BA542} = {864062D3-A415-4A6F-9324-5820237BA058} {A87352E6-CE7F-4346-B6B1-586AE931C0A7} = {864062D3-A415-4A6F-9324-5820237BA058} + {BD1D66BF-5AC7-4926-8EBE-B2198A112EB0} = {CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.projitems b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.projitems new file mode 100644 index 00000000000..fb84fb55378 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.projitems @@ -0,0 +1,26 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + {BD1D66BF-5AC7-4926-8EBE-B2198A112EB0} + + + Xamarin.Android.Build.Tests.Shared + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.shproj b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.shproj new file mode 100644 index 00000000000..bcab6c4f586 --- /dev/null +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.Shared.shproj @@ -0,0 +1,11 @@ + + + + {BD1D66BF-5AC7-4926-8EBE-B2198A112EB0} + + + + + + + \ No newline at end of file diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj index ff0224e2f9c..cc00e5270b6 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj @@ -9,6 +9,7 @@ Xamarin.Android.Build.Tests v4.5.1 + true @@ -38,18 +39,6 @@ ..\..\..\..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll - - - - - - - - - - - - @@ -66,6 +55,5 @@ - From ffa0e7e099d87925f3149c6d7bbb448d1088a45a Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 20 Mar 2017 13:37:10 +0000 Subject: [PATCH 2/2] Fixed Solution --- Xamarin.Android.sln | 2 -- 1 file changed, 2 deletions(-) diff --git a/Xamarin.Android.sln b/Xamarin.Android.sln index 11f1a5c61d4..4c718d8463d 100644 --- a/Xamarin.Android.sln +++ b/Xamarin.Android.sln @@ -113,8 +113,6 @@ Global Release|AnyCPU = Release|AnyCPU XAIntegrationDebug|AnyCPU = XAIntegrationDebug|AnyCPU XAIntegrationRelease|AnyCPU = XAIntegrationRelease|AnyCPU - XAIntegrationDebug|Any CPU = XAIntegrationDebug|Any CPU - XAIntegrationRelease|Any CPU = XAIntegrationRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU