From c950c1fba49218314858347cda45b85a689aab3d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 17 Nov 2025 22:09:37 +0100 Subject: [PATCH] [tests] Fix test variations for monotouch-test. These test variations need to go in the shared list of test variations, because they contains conditional compilation symbols that need to be set for referenced projects as well. Also a few other improvements: * Order the test variations identically between the item group with descriptions and the property groups. * Add a sanity check to verify that if a test variation is specified, then something actually happens. * Use 'TrimMode' instead of 'LinkMode'+'MtouchLink' - this avoids forgetting to set either 'LinkMode' or 'MtouchLink'. --- tests/common/test-variations.csproj | 70 ++++++++++++++++++----- tests/monotouch-test/dotnet/shared.csproj | 31 ---------- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/tests/common/test-variations.csproj b/tests/common/test-variations.csproj index 83700f5f03e..847d55dcbd1 100644 --- a/tests/common/test-variations.csproj +++ b/tests/common/test-variations.csproj @@ -1,5 +1,6 @@ + @@ -12,6 +13,10 @@ + + + + @@ -20,50 +25,84 @@ Debug + <_TestVariationApplied>true Release + <_TestVariationApplied>true true - - - - true - <_IsPublishing>true - - - - SdkOnly - $(MtouchLink) - - - - Full - $(MtouchLink) + <_TestVariationApplied>true true + <_TestVariationApplied>true false + <_TestVariationApplied>true true <_IsPublishing>true + <_TestVariationApplied>true + + + + partial + <_TestVariationApplied>true + + + + full + <_TestVariationApplied>true false + <_TestVariationApplied>true true + <_TestVariationApplied>true + + + + $(AppBundleExtraOptions) --optimize:all + static + $(DefineConstants);OPTIMIZEALL + <_TestVariationApplied>true + + + + $(AppBundleExtraOptions) --optimize:all + static + full + $(DefineConstants);OPTIMIZEALL + <_TestVariationApplied>true + + + + $(AppBundleExtraOptions) --optimize:all,-remove-uithread-checks + static + full + $(DefineConstants);OPTIMIZEALL + <_TestVariationApplied>true + + + + $(AppBundleExtraOptions) --optimize:all + managed-static + full + $(DefineConstants);OPTIMIZEALL + <_TestVariationApplied>true @@ -71,5 +110,6 @@ <_InvalidTestVariations Include="$(TestVariation.Split('|'))" Exclude="@(TestVariations)" /> + diff --git a/tests/monotouch-test/dotnet/shared.csproj b/tests/monotouch-test/dotnet/shared.csproj index dd8123b67f0..a68206c4621 100644 --- a/tests/monotouch-test/dotnet/shared.csproj +++ b/tests/monotouch-test/dotnet/shared.csproj @@ -62,37 +62,6 @@ - - - - - - - - - $(AppBundleExtraOptions) --optimize:all - static - $(DefineConstants);OPTIMIZEALL - - - $(AppBundleExtraOptions) --optimize:all - static - Full - $(DefineConstants);OPTIMIZEALL - - - $(AppBundleExtraOptions) --optimize:all,-remove-uithread-checks - static - Full - $(DefineConstants);OPTIMIZEALL - - - $(AppBundleExtraOptions) --optimize:all - managed-static - Full - $(DefineConstants);OPTIMIZEALL - -