-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support net452 tests in osx/linux (with mono) #679
Comments
Experimented a bit on an Ubuntu 16.04 box: Tried to workaround by making #!/bin/bash
ppid=$$
command=$(echo "$@" | sed -e "s/--parentprocessid\s\d\s/--parentprocessid\s$ppid\s/")
echo $command
mono ~/src/vstest/tools/dotnet/sdk/2.0.0-preview1-005685/TestHost/testhost2.x86.exe $command It seems testhost is exiting early and that breaks the communication pipe. The
Here's the messages from vstest.console at the same time
Need help to figure if this is a bug in mono. |
Steps I used to run test: Restore+build
then copy
also copy TestHost
and then execute
I think you will know how to automate whole thing to load MSTest adapter without parameter and without all copying to Extensions and TestHost... |
Thanks @DavidKarlas, I have raised a PR for this (#851). Is it expected that |
Mono implementation of |
* Add platform abstraction for OS name and architecture. Related #820 #679 * Fix build failures due to incorrect references. * Publish projects for net46 if mono is available. * Fix typo in build script. * Support for mono in multitargeted tests. Choose mono as launcher for net46 tests if the launcher for vstest.console is not mono (e.g. dotnet test).
@DavidKarlas I've merged #851. It unblocks running tests with a workaround. We're hitting an assembly load exception when the test adapters are loaded in testhost.x86.exe, this doesn't occur if we disable appdomains for the test run. Steps that work after #851 is merged# cd to vstest repo
> ./build.sh
> mono artifacts/Debug/net46/ubuntu.16.04-x64/vstest.console.exe samples/UnitTestProject/bin/Debug/net46/UnitTestProject.dll --framework:Framework45 --testAdapterPath:packages/mstest.testadapter/1.1.14/build/_common -- RunConfiguration.DisableAppDomain=true Steps that fails due to assembly load# cd to vstest repo
> ./build.sh
> mono artifacts/Debug/net46/ubuntu.16.04-x64/vstest.console.exe samples/UnitTestProject/bin/Debug/net46/UnitTestProject.dll --framework:Framework45 --testAdapterPath:packages/mstest.testadapter/1.1.14/build/_common If Debug log
|
I'm reproducing kinda same problem on Windows:
Only difference is that Mono crashes, and Windows for some reason continues execution |
* Add platform abstraction for OS name and architecture. Related microsoft#820 microsoft#679 * Fix build failures due to incorrect references. * Publish projects for net46 if mono is available. * Fix typo in build script. * Support for mono in multitargeted tests. Choose mono as launcher for net46 tests if the launcher for vstest.console is not mono (e.g. dotnet test).
* Add platform abstraction for OS name and architecture. (#851) * Add platform abstraction for OS name and architecture. Related #820 #679 * Fix build failures due to incorrect references. * Publish projects for net46 if mono is available. * Fix typo in build script. * Support for mono in multitargeted tests. Choose mono as launcher for net46 tests if the launcher for vstest.console is not mono (e.g. dotnet test). * Fix build script merge error.
@DavidKarlas : Please try with latest dotnet tools if you are still facing this issue. Closing this issue for now. Please reopen it if you have any thing to discuss here. |
It is possible to build projects targeting
net4x
withdotnet build
(using these steps: https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-1.0.1#using-net-framework-as-targets-framework-the-osxunix-build-fails).dotnet test
should invoke testhost withmono
runtime fornet4x
targets in osx/unix.The text was updated successfully, but these errors were encountered: