Skip to content

Commit 28add0d

Browse files
authored
[Xamarin.Android.Build.Tests] Import tests from last regression test job (dotnet#5101)
Context: https://github.com/xamarin/QualityAssurance/pull/3646 CI and Xamarin.Android.Build.Tests have been updated to reflect the third round of regression test auditing. The Xamarin.Android YAML pipeline no longer contains QA test jobs, and the following regression test categories have been removed: * `RuntimeTests` - Still runs on multiple devices on the [external test job][1]. * `Hello` - Still runs on multiple devices on the [external test job][1]. * `RegressionDeviceTests` - Obsolete tests removed, some missing coverage migrated to `SubscribeToAppDomainUnhandledException`. * `FastDevDeviceTests` - Obsolete tests removed, some missing coverage migrated to `IncrementalFastDeployment`. * `BuildPerformance` - Missing coverage migrated. * `AotSupport` - Obsolete tests removed, some missing coverage migrated to `NoSymbolsArgShouldReduceAppSize`. The `dotnet` test categories have been removed as they are no longer used as far as I can tell. The `DotNetIgnore` category is the preferred way to filter tests that aren't compatible with One .NET. `AndroidUpdateResourceTest.RepetitiveBuild` has been removed, as it appeared to be a duplicate of `IncrementalBuildTest.BasicApplicationRepetitiveBuild`. `BuildTest.BuildReleaseApplication` has also been removed as it is implicitly covered by other release configuration tests. [1]: https://dev.azure.com/devdiv/DevDiv/_release?definitionId=476&view=mine&_a=releases.
1 parent e113bc1 commit 28add0d

File tree

14 files changed

+595
-633
lines changed

14 files changed

+595
-633
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,40 +1111,6 @@ stages:
11111111
condition: and(eq(dependencies.mac_build.result, 'Succeeded'), eq(variables['RunAllTests'], true))
11121112
jobs:
11131113

1114-
# Check - "Xamarin.Android (Regression Tests Mac)"
1115-
- job: integrated_regression_mac
1116-
displayName: Mac
1117-
pool:
1118-
name: VSEng-Xamarin-Mac-Devices
1119-
demands:
1120-
- android
1121-
timeoutInMinutes: 240
1122-
cancelTimeoutInMinutes: 5
1123-
workspace:
1124-
clean: all
1125-
steps:
1126-
- template: yaml-templates/run-integrated-regression-tests.yaml
1127-
1128-
# Check - "Xamarin.Android (Regression Tests Windows)"
1129-
- job: integrated_regression_win
1130-
displayName: Windows
1131-
pool:
1132-
name: VSEng-Xamarin-Win-XMA
1133-
demands:
1134-
- android
1135-
timeoutInMinutes: 240
1136-
cancelTimeoutInMinutes: 5
1137-
workspace:
1138-
clean: all
1139-
variables:
1140-
XQA_VISUALSTUDIO_LOCATION: '%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise'
1141-
steps:
1142-
- template: remove-visualstudio.yml@yaml
1143-
1144-
- template: yaml-templates\run-integrated-regression-tests.yaml
1145-
1146-
- template: remove-visualstudio.yml@yaml
1147-
11481114
# TimeZoneInfo tests
11491115
- template: yaml-templates\run-timezoneinfo-tests.yaml
11501116
parameters:

build-tools/automation/yaml-templates/run-integrated-regression-tests.yaml

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Xamarin.Android.Build.Tests
1010
{
1111
[TestFixture]
12-
[Category ("Node-3"), Category ("dotnet")]
12+
[Category ("Node-3")]
1313
[Parallelizable (ParallelScope.Children)]
1414
public class AndroidDependenciesTests : BaseTest
1515
{

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace Xamarin.Android.Build.Tests
1818
public class AndroidUpdateResourcesTest : BaseTest
1919
{
2020
[Test]
21-
[Category ("dotnet")]
2221
public void CheckMultipleLibraryProjectReferenceAlias ([Values (true, false)] bool withGlobal)
2322
{
2423
var path = Path.Combine (Root, "temp", TestName);
@@ -81,27 +80,7 @@ public void BuildAppWithSystemNamespace ()
8180
}
8281

8382
[Test]
84-
public void RepetitiveBuild ()
85-
{
86-
if (Directory.Exists ("temp/RepetitiveBuild"))
87-
Directory.Delete ("temp/RepetitiveBuild", true);
88-
var proj = new XamarinAndroidApplicationProject ();
89-
using (var b = CreateApkBuilder ("temp/RepetitiveBuild", cleanupAfterSuccessfulBuild: false, cleanupOnDispose: false)) {
90-
b.Verbosity = Microsoft.Build.Framework.LoggerVerbosity.Diagnostic;
91-
b.ThrowOnBuildFailure = false;
92-
Assert.IsTrue (b.Build (proj), "first build failed");
93-
Assert.IsTrue (b.Build (proj), "second build failed");
94-
Assert.IsTrue (b.Output.IsTargetSkipped ("_Sign"), "failed to skip some build");
95-
var item = proj.AndroidResources.First (x => x.Include () == "Resources\\values\\Strings.xml");
96-
item.TextContent = () => proj.StringsXml.Replace ("${PROJECT_NAME}", "Foo");
97-
item.Timestamp = null;
98-
Assert.IsTrue (b.Build (proj), "third build failed");
99-
Assert.IsFalse (b.Output.IsTargetSkipped ("_Sign"), "incorrectly skipped some build");
100-
}
101-
}
102-
103-
[Test]
104-
[Category ("SmokeTests"), Category ("dotnet")]
83+
[Category ("SmokeTests")]
10584
public void DesignTimeBuild ([Values(false, true)] bool isRelease, [Values (false, true)] bool useManagedParser, [Values (false, true)] bool useAapt2)
10685
{
10786
var regEx = new Regex (@"(?<type>([a-zA-Z_0-9])+)\slibrary_name=(?<value>([0-9A-Za-z])+);", RegexOptions.Compiled | RegexOptions.Multiline );
@@ -239,7 +218,6 @@ public void ReportAaptWarningsForBlankLevel ([Values (false, true)] bool useAapt
239218
}
240219

241220
[Test]
242-
[Category ("dotnet")]
243221
public void RepetiviteBuildUpdateSingleResource ([Values (false, true)] bool useAapt2)
244222
{
245223
var proj = new XamarinAndroidApplicationProject ();
@@ -794,7 +772,6 @@ public void CheckAaptErrorRaisedForDuplicateResourceinApp ()
794772
}
795773

796774
[Test]
797-
[Category ("dotnet")]
798775
public void CheckFilesAreRemoved () {
799776

800777
var proj = new XamarinAndroidApplicationProject () {
@@ -830,7 +807,6 @@ public void CheckFilesAreRemoved () {
830807
}
831808

832809
[Test]
833-
[Category ("dotnet")]
834810
public void CheckDontUpdateResourceIfNotNeeded ()
835811
{
836812
var path = Path.Combine ("temp", TestName);
@@ -935,7 +911,6 @@ public string GetFoo () {
935911
}
936912

937913
[Test]
938-
[Category ("dotnet")]
939914
public void BuildAppWithManagedResourceParser()
940915
{
941916
var path = Path.Combine ("temp", "BuildAppWithManagedResourceParser");
@@ -975,7 +950,6 @@ public void BuildAppWithManagedResourceParser()
975950

976951
[Test]
977952
[NonParallelizable]
978-
[Category ("dotnet")]
979953
public void BuildAppWithManagedResourceParserAndLibraries ()
980954
{
981955
int maxBuildTimeMs = 10000;

0 commit comments

Comments
 (0)