Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Enable native tests for macOS+
dotnet test
(#806)
Context: #804 Two changes within commit 89a5a22 allow `dotnet test` to be used to run the net472 mono-required NUnit tests: 1. The `java-interop` native library is reliably copied to the `$(OutputPath)` of referencing projects. This ensures that e.g. `bin/TestDebug/libjava-interop.dylib` exists without extra `make` commands or an `msbuild /t:RunTests` invocation. 2. More importantly, `tests/TestJVM` was updated to use `Xamarin.Android.Tools.AndroidSdk.dll` along with `JdkInfo.GetKnownSystemJdkInfos()`. (2) means that the `JI_JVM_PATH` environment variable doesn't *need* to be set before running unit tests, and is largely responsible for allowing `dotnet test` to work: % make prepare all % dotnet test bin/TestDebug/Java.Interop-Tests.dll … Passed! - Failed: 0, Passed: 631, Skipped: 1, Total: 632, Duration: 686 ms Note that these tests are *not* executed under .NET Core/CoreCLR! It's simply using `dotnet test` as an equivalent to/replacement for `mono nunit3-console.exe`. Java.Interop-Tests to be run under .NET Core are built into e.g. `bin/TestDebug-netcoreapp3.1/Java.Interop-Tests.dll`, and trying to run *that* test suite crashes and burns: % dotnet test bin/TestDebug-netcoreapp3.1/Java.Interop-Tests.dll … Failed! - Failed: 16, Passed: 325, Skipped: 1, Total: 342, Duration: 311 ms See e.g. PR #804 for an attempt to make .NET Core support work.
- Loading branch information