-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Mono] Turn Samples into Functional Tests #44016
[Mono] Turn Samples into Functional Tests #44016
Conversation
Tagging subscribers to this area: @CoffeeFlux |
|
@jkotas Thank you for a quick look.
Do you mean readme for existing samples?
As far as I know those sample are used for showing off the platforms we support. Also they are useful for some debugging purposes. I don't know if the samples are supposed to be copied to create new apps.
I mostly worked with library tests so that's why I started here. If the location you mentioned is better then I'll consider that option. |
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
@jkotas These are no longer samples. The intent is to run them through AOT/Interp/JIT to give us a good sense that a barebones app is working. |
No, these are specific tests which verify that MonoVM based runtime packs work as expected. I don't think CoreCLR has any such tests otherwise it'd be nice to share the logic.
Yes but apparently there is no infrastructure yet in place to support having them there. |
Then the directory should not be called Samples. The best name I can think of is I do not think the name should be Mono-specific. You can imagine having e.g. ASP.NET barebone app inside this set of tests too. |
src/libraries/IntegrationTests/tests/iOS/iOS.Integration.Tests.csproj
Outdated
Show resolved
Hide resolved
src/libraries/IntegrationTests/tests/iOS/iOS.Integration.Tests.csproj
Outdated
Show resolved
Hide resolved
const string msg = "Hello World!\n.NET 5.0"; | ||
for (int i = 0; i < msg.Length; i++) | ||
{ | ||
// a kind of an animation | ||
ios_set_text(msg.Substring(0, i + 1)); | ||
await Task.Delay(100); | ||
} | ||
|
||
Console.WriteLine("Done!"); | ||
await Task.Delay(-1); |
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.
This needs to check some error codes
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.
Why is there a 'tests' directory under 'IntegrationTests' ?
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.
This follows the structure, which other library directories have, in order to be included in
runtime/src/libraries/tests.proj
Line 168 in 65d3e28
<ProjectReference Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" |
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Closing it in favor of #44462 |
Related issue: #43865
The idea is to copy existing mono samples to a particular place within runtime/src/libraries/ directory and tune them to re-use library test infra like it's done for other functional tests.
As a first step, I'll try to do it with iOS sample. Any ideas on how to do it better/more correct are appreciated.