Skip to content

Restructure the project for consistency with xamarin-android#5

Merged
dellis1972 merged 1 commit intodotnet:masterfrom
jonpryor:jonp-dir-structure
Sep 7, 2017
Merged

Restructure the project for consistency with xamarin-android#5
dellis1972 merged 1 commit intodotnet:masterfrom
jonpryor:jonp-dir-structure

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Sep 7, 2017

Xamarin.Android.sln is now a toplevel file, so it's easier to see
without navigating into the src directory.

Add a Makefile with three targets of consequence:

  • make prepare: Prepare the project for building, e.g.
    restore NuGet packages.
  • make all: Build the project.
  • make run-all-tests: Run the NUnit tests.

Move unit tests for Xamarin.Android.Tools into
src/Xamarin.Android.Tools/Tests (child, not a peer).

Rename the unit test assembly to Xamarin.Android.Tools-Tests.dll,
and build into bin/Test$(Configuration).

Update to use NUnit 3.2.1 packages.

Update README.md with build instructions.

Add a LICENSE file.

Rename Xamarin.Android.Tools.dll to
Xamarin.Android.Tools.AndroidSdk.dll. Xamarin.Android already has
multiple Xamarin.Android.Tools.*.dll assemblies, e.g.
Xamarin.Android.Tools.BootstrapTasks.dll. Naming-wise,
Xamarin.Android.Tools.dll sounds like it should be core to all
related assemblies, but it isn't, and won't be. Instead, its core
responsibility is around the Android SDK, so name it accordingly.

@jonpryor jonpryor requested a review from dellis1972 September 7, 2017 02:13
@jonpryor jonpryor force-pushed the jonp-dir-structure branch 3 times, most recently from dcc7046 to b3f892c Compare September 7, 2017 02:38
Makefile Outdated
# $(call RUN_NUNIT_TEST,filename,log-lref?)
define RUN_NUNIT_TEST
MONO_TRACE_LISTENER=Console.Out \
$(RUNTIME) --runtime=v4.0.0 \
Copy link
Contributor

Choose a reason for hiding this comment

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

should this not just be v4.0 ? Not sure what windows will do with v4.0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's different/worse from that: --runtime is a mono option, and if mono is not used, there will thus be no command at all, which is bad.

On the ¯_(ツ)_/¯ side, this is what xamarin-android does...

I'll remove the --runtime option. It might not be needed anymore now that I'm using NUnit 3.2.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the newer NUnit does a better job at detecting mono.

Copy link
Contributor

Choose a reason for hiding this comment

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

I tend to use the --framework option though..

`Xamarin.Android.sln` is now a toplevel file, so it's easier to see
without navigating into the `src` directory.

Add a `Makefile` with three targets of consequence:

  * `make prepare`: Prepare the project for building, e.g.
    restore NuGet packages.
  * `make all`: Build the project.
  * `make run-all-tests`: Run the NUnit tests.

Update to use NUnit 3.2.1 packages.

Update `README.md` with build instructions.

Add a `LICENSE` file.

Rename `Xamarin.Android.Tools.dll` to
`Xamarin.Android.Tools.AndroidSdk.dll`. Xamarin.Android already has
multiple `Xamarin.Android.Tools.*.dll` assemblies, e.g.
`Xamarin.Android.Tools.BootstrapTasks.dll`. Naming-wise,
`Xamarin.Android.Tools.dll` sounds like it should be *core* to *all*
related assemblies, but it isn't, and won't be. Instead, its core
responsibility is around the Android SDK, so name it accordingly.

Move unit tests for `Xamarin.Android.Tools.AndroidSdk` into
`src/Xamarin.Android.Tools.AndroidSdk/Tests` (child, not a peer).

Rename the unit test assembly to
`Xamarin.Android.Tools.AndroidSdk-Tests.dll`, and build into
`bin/Test$(Configuration)`.
@dellis1972 dellis1972 merged commit e875d77 into dotnet:master Sep 7, 2017
rmarinho added a commit that referenced this pull request Mar 13, 2026
Fix #1: Validate avdName in LaunchAvd (ArgumentException on null/empty)
Fix #2: RunShellCommandAsync now returns full trimmed stdout (not just first line)
Fix #3: Add 9 FirstNonEmptyLine parsing tests + 3 LaunchAvd validation tests
Fix #5: Log stderr via logger on shell command failures (AdbRunner gets logger param)
Fix #6: Remove TOCTOU HasExited check in TryKillProcess (rely on catch block)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Mar 13, 2026
Fix #1: Validate avdName in LaunchAvd (ArgumentException on null/empty)
Fix #2: RunShellCommandAsync now returns full trimmed stdout (not just first line)
Fix #3: Add 9 FirstNonEmptyLine parsing tests + 3 LaunchAvd validation tests
Fix #5: Log stderr via logger on shell command failures (AdbRunner gets logger param)
Fix #6: Remove TOCTOU HasExited check in TryKillProcess (rely on catch block)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants