Skip to content

Conversation

@dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Apr 15, 2019

As part of a move to unify our unit tests into the
main repo this PR brings in all the InstantRun tests.
They are protected bbehind a CommercialBuildAvailable
check which will only be true if the commercial parts
are available. The commercial tests are also flagged with
a nunit category attribute of Commercial just in case we
decide to filter in the future.

This PR also makes some changes to the folder structure.
ALL Task based tests (i.e ones that test just a Task using
the MockBbuildEngine) have been moved into the Tasks folder.
We already have a few tests in that folder, this make sure
they are all in one place.

the *.OSS.cs partial class files have been renamed to
*.TestCaseSource.cs. They also handle the tests for BOTH
open source and commercial builds. As a result they will
not longer be needed in the commercial repo. They were also
moved into the shared project. This change will probably cause
commercial build failures until PR #966 is merged on the
commercial side.

@dellis1972 dellis1972 added the do-not-merge PR should not be merged. label Apr 15, 2019
@dellis1972 dellis1972 removed the do-not-merge PR should not be merged. label Apr 16, 2019
@dellis1972 dellis1972 marked this pull request as ready for review April 16, 2019 10:02
@dellis1972 dellis1972 changed the title [Xamarin.Android.Build.Tests] Port Tests from commercial repo [WIP] [Xamarin.Android.Build.Tests] Port Tests from commercial repo Apr 16, 2019
As part of a move to unify our unit tests into the
main repo this PR brings in all the InstantRun tests.
They are protected bbehind a `CommercialBuildAvailable`
check which will only be `true` if the commercial parts
are available. The commercial tests are also flagged with
a nunit category attribute of `Commercial` just in case we
decide to filter in the future.

This PR also makes some changes to the folder structure.
ALL `Task` based tests (i.e ones that test just a Task using
the MockBbuildEngine) have been moved into the `Tasks` folder.
We already have a few tests in that folder, this make sure
they are all in one place.

the `*.OSS.cs` partial class files have been renamed to
`*.TestCaseSource.cs`. They also handle the tests for BOTH
open source and commercial builds. As a result they will
not longer be needed in the commercial repo. They were also
moved into the shared project. This change will probably cause
commercial build failures until PR dotnet#966 is merged on the
commercial side.
Assert.Ignore ("Not required on Open Source Builds");

if (!HasDevices) {
Assert.Ignore ("Test Skipped no devices or emulators found.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monodroid has some EmulatorHelper.csproj that starts the emulator. Do we need something like that in this PR?

It might be we can use the newer MSBuild tasks in this repo to do that.

@jonpryor jonpryor merged commit 66d0165 into dotnet:master Apr 16, 2019
jonpryor pushed a commit that referenced this pull request Apr 16, 2019
Commit 66d0165 [broke the macOS build][0]:

	…/xamarin-android/tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.targets(18,5): error MSB3030: Could not copy the file "../../bin/TestRelease/Xamarin.Android.Cecil.Mdb.dll" because it was not found.

This was probably "overlooked" because the builds for PR #2980 didn't
include bf58a88/PR #2855.

Update the paths used for `Xamarin.Android.Cecil*.dll` so that
`MSBuildDeviceIntegration.targets` can run without error.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/463/
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants