-
Notifications
You must be signed in to change notification settings - Fork 5k
[tests] Add MonoApi runtime tests #65221
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
Conversation
00af384
to
7bbc8db
Compare
2d5c50e
to
9cb521d
Compare
Fixed C++ compilation issues.
More ugly hacks.
Had to copy the w32_find_symbol code that searches for a symbol in every module.
Delete some unrunnable tests. Copy some basic eglib utilities into the test.
Maybe get the module name from managed, based on platform, instead?
Not expected to run on coreclr or mono on wasm or mobile, for now.
18e46d4
to
4d063ea
Compare
/cc @dotnet/interop-contrib @trylek I'd love some feedback on the overall setup for these tests |
@lateralusX I kept most of the win32 code from libtest.c, and I believe the native library is building as part of the coreclr win32 tests build, but I haven't tried running the tests on Windows Mono. |
@@ -0,0 +1,6 @@ | |||
// This file intentionally doesn't have header guards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
@@ -2,9 +2,11 @@ | |||
using System.Reflection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
@@ -7,14 +7,33 @@ | |||
using System.Threading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
@@ -2,19 +2,21 @@ | |||
using System.Runtime.InteropServices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
@@ -0,0 +1,32 @@ | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
src/tests/Interop/CMakeLists.txt
Outdated
@@ -102,3 +102,5 @@ if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS) | |||
add_subdirectory(ObjectiveC/AutoReleaseTest) | |||
add_subdirectory(ObjectiveC/ObjectiveCMarshalAPI) | |||
endif() | |||
|
|||
add_subdirectory(MonoAPI/Native) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this up to before the first if
branch since it should be always done and with that "group".
@@ -0,0 +1,1088 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing MIT banner.
OK, I can look at that once the PR has been merged. |
Interesting, thunks test failure on llvmaot is relevant. need to check if that test ran with aot in mono/mono |
a7439ac
to
e2a4933
Compare
Yea, we skipped that test on AOT configurations in mono/mono |
In the mono/mono repo that test was not expected to work with AOT
e2a4933
to
8e3aa5e
Compare
Contributes to #64456
Create a new directory
src/tests/Interop/MonoAPI
for tests that use the mono embedding API.Move the mono
libtest.c
native library along with managed tests:InstallEHCallback.cs
,PInvokeDetach.cs
andThunks.cs
tosrc/tests/Interop/MonoAPI/...
The native library (now called
mono-embedding-api-test.c
) builds on all platforms where we build native support libraries for the runtime tests.The managed tests only run on desktop mono configurations for now.