Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tests] Import tests from last regression test …
Browse files Browse the repository at this point in the history
…job (#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.
  • Loading branch information
pjcollins authored Sep 15, 2020
1 parent e113bc1 commit 28add0d
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 633 deletions.
34 changes: 0 additions & 34 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1111,40 +1111,6 @@ stages:
condition: and(eq(dependencies.mac_build.result, 'Succeeded'), eq(variables['RunAllTests'], true))
jobs:

# Check - "Xamarin.Android (Regression Tests Mac)"
- job: integrated_regression_mac
displayName: Mac
pool:
name: VSEng-Xamarin-Mac-Devices
demands:
- android
timeoutInMinutes: 240
cancelTimeoutInMinutes: 5
workspace:
clean: all
steps:
- template: yaml-templates/run-integrated-regression-tests.yaml

# Check - "Xamarin.Android (Regression Tests Windows)"
- job: integrated_regression_win
displayName: Windows
pool:
name: VSEng-Xamarin-Win-XMA
demands:
- android
timeoutInMinutes: 240
cancelTimeoutInMinutes: 5
workspace:
clean: all
variables:
XQA_VISUALSTUDIO_LOCATION: '%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise'
steps:
- template: remove-visualstudio.yml@yaml

- template: yaml-templates\run-integrated-regression-tests.yaml

- template: remove-visualstudio.yml@yaml

# TimeZoneInfo tests
- template: yaml-templates\run-timezoneinfo-tests.yaml
parameters:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Xamarin.Android.Build.Tests
{
[TestFixture]
[Category ("Node-3"), Category ("dotnet")]
[Category ("Node-3")]
[Parallelizable (ParallelScope.Children)]
public class AndroidDependenciesTests : BaseTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace Xamarin.Android.Build.Tests
public class AndroidUpdateResourcesTest : BaseTest
{
[Test]
[Category ("dotnet")]
public void CheckMultipleLibraryProjectReferenceAlias ([Values (true, false)] bool withGlobal)
{
var path = Path.Combine (Root, "temp", TestName);
Expand Down Expand Up @@ -81,27 +80,7 @@ public void BuildAppWithSystemNamespace ()
}

[Test]
public void RepetitiveBuild ()
{
if (Directory.Exists ("temp/RepetitiveBuild"))
Directory.Delete ("temp/RepetitiveBuild", true);
var proj = new XamarinAndroidApplicationProject ();
using (var b = CreateApkBuilder ("temp/RepetitiveBuild", cleanupAfterSuccessfulBuild: false, cleanupOnDispose: false)) {
b.Verbosity = Microsoft.Build.Framework.LoggerVerbosity.Diagnostic;
b.ThrowOnBuildFailure = false;
Assert.IsTrue (b.Build (proj), "first build failed");
Assert.IsTrue (b.Build (proj), "second build failed");
Assert.IsTrue (b.Output.IsTargetSkipped ("_Sign"), "failed to skip some build");
var item = proj.AndroidResources.First (x => x.Include () == "Resources\\values\\Strings.xml");
item.TextContent = () => proj.StringsXml.Replace ("${PROJECT_NAME}", "Foo");
item.Timestamp = null;
Assert.IsTrue (b.Build (proj), "third build failed");
Assert.IsFalse (b.Output.IsTargetSkipped ("_Sign"), "incorrectly skipped some build");
}
}

[Test]
[Category ("SmokeTests"), Category ("dotnet")]
[Category ("SmokeTests")]
public void DesignTimeBuild ([Values(false, true)] bool isRelease, [Values (false, true)] bool useManagedParser, [Values (false, true)] bool useAapt2)
{
var regEx = new Regex (@"(?<type>([a-zA-Z_0-9])+)\slibrary_name=(?<value>([0-9A-Za-z])+);", RegexOptions.Compiled | RegexOptions.Multiline );
Expand Down Expand Up @@ -239,7 +218,6 @@ public void ReportAaptWarningsForBlankLevel ([Values (false, true)] bool useAapt
}

[Test]
[Category ("dotnet")]
public void RepetiviteBuildUpdateSingleResource ([Values (false, true)] bool useAapt2)
{
var proj = new XamarinAndroidApplicationProject ();
Expand Down Expand Up @@ -794,7 +772,6 @@ public void CheckAaptErrorRaisedForDuplicateResourceinApp ()
}

[Test]
[Category ("dotnet")]
public void CheckFilesAreRemoved () {

var proj = new XamarinAndroidApplicationProject () {
Expand Down Expand Up @@ -830,7 +807,6 @@ public void CheckFilesAreRemoved () {
}

[Test]
[Category ("dotnet")]
public void CheckDontUpdateResourceIfNotNeeded ()
{
var path = Path.Combine ("temp", TestName);
Expand Down Expand Up @@ -935,7 +911,6 @@ public string GetFoo () {
}

[Test]
[Category ("dotnet")]
public void BuildAppWithManagedResourceParser()
{
var path = Path.Combine ("temp", "BuildAppWithManagedResourceParser");
Expand Down Expand Up @@ -975,7 +950,6 @@ public void BuildAppWithManagedResourceParser()

[Test]
[NonParallelizable]
[Category ("dotnet")]
public void BuildAppWithManagedResourceParserAndLibraries ()
{
int maxBuildTimeMs = 10000;
Expand Down
Loading

0 comments on commit 28add0d

Please sign in to comment.