* [wasm][tests] Support running tests with a browser
- WasmAppBuilder will generate an `index.html` which will be used to run
the tests
- runtime-test.js: For the browser case, a simple `exit` doesn't end the script
execution, so we explicitly `return` in the code, to stop.
* Update tools-local/tasks/mobile.tasks/WasmAppBuilder/WasmAppBuilder.cs
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* [wasm] runtime-test.js: correctly load js files in the browser case
* [wasm][tests] runtime-test.js: Add a special element on exit, which the
.. `wasm test-browser` command can watch for.
* Update src/mono/wasm/runtime-test.js
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* runtime-test.js: Correctly handle the case of no arguments.
* runtime-test.js: Ensure `arguments` is not undefined
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
This PR overhauls runtime startup/asset loading and adds support for ICU integration.
The mono-config.js format is reworked and simplified, with new functionality added:
Individual assets can be loaded from one or more remote sources with configurable fallback behavior
In addition to the existing support for loading assemblies, you can now pre-load arbitrary files into the native heap or into emscripten's virtual file system. VFS support previously only existed in runtime-test.js but now is available to any consumer of dotnet.js.
Assets can have a virtual path set so that their application-facing path does not necessarily have to match their path on the server.
One or more ICU data archives can be added to the assets list and will be automatically loaded and used to enable ICU-based globalization support.
Many configuration knobs that previously required API calls can now be set declaratively in the configuration file (environment variables, etc.)
WasmAppBuilder is updated to add ICUDataFiles and RemoteSources parameters that can be used to add the associated information to the config file declaratively from a msbuild project.
Various adjustments are made to existing tests and test cases so that they will pass with the addition of ICU integration.
Co-authored-by: EgorBo <egorbo@gmail.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* [wasm] Implement pinvoke callback support.
* Allow void return types.
* Fix name mangling for assembly names.
* Handle MonoPInvokeCallbackAttribute as well for now.
Add zoneinfo data for System.Runtime.TimeZoneInfoTests
* Include dotnet.timezones.blat in runtime pack
* Adding enable-zoneinfo to runscriptcommand in tests.mobile.targets
* add mono_wasm_load_data to library-mono.js
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Add support to map test support files to wasm vfs in WasmAppBuilder
* PR Feedback
* Remove workaround for System.Reflection.Metadata.Tests
* Add BCL and BuildReference assets to VFS
* PR Feedback and fix more test projects
* Avoid potential null ref
* Add System.Security.Cryptography.Algorithms to the pinvoke generator.
* Fix a stack overflow in WasmAppBuilder.
* [wasm] Unset MONO_LOG_MASK when running tests.
Its set to 'gc' by default which causes extra log messages to be added to the testResult.xml file.
* Turn off GC logging by default.
* Create Microsoft.NetCore.App.Ref
Binplace reference assemblies into a Microsoft.NetCore.App.Ref folder
and also copy data files like the RuntimeList.xml and the
PlatformManifest.txt there.
Rename the runtime pack to microsoft.netcore.app.runtime.$(RID)
Fixing a restore issue in the wasm builder (restore and build should
not happen in the same msbuild invocation).
Change the runtime pack to only include either the debug or release version of dotnet.js/wasm like we do for other targets.
Fixes an issue where self-contained publish didn't work anymore because the RuntimeList.xml contained two files with the same name.
* [wasm] Include the pinvoke table into a separate file, so the generated declarations don't conflict with the ones in the header files included by driver.c.
Same as https://github.com/mono/mono/pull/19853.
* Update src/mono/wasm/runtime/pinvoke.c
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Fix the test runner script.
* Add a ExtraFiles property to the wasm app builder.
* Add helper make targets.
* Bump sdk version to pick up wasm support.
* Fix make targets.
* Compile wasm runtime with --enable-minimal=threads.
The linker was removing the icu shim functions even exporting them. The unique solution that we found until now is to force the linking using the -u flag.
This is a temporary fix until we don't implement QCalls.
Fixes https://github.com/dotnet/runtime/issues/36685
* Add an ExtraAssemblies parameter to the WasmAppBuilder task.
* Pass more assemblies to the pinvoke table generator.
* Improve the wasm sample.
* Move WasmAppBuilder to tools-local.
We initially intended to just use libmono.so/dylib as the name to simplify and follow the libcoreclr.dylib pattern and we did that by just copying to a different name after the build.
However that didn't work on Android since the name gets embedded inside the binary and Android checks that these match, so we'd either have to change the (auto)make to use the correct library name (and possibly creates complex conditionals in the Makefile for netcore) or go back to using `libmonosgen-2.0` on iOS.
We decided to do the latter.
* Delete task code that has been moved to the shared framework SDK in Arcade
* Remove RegenerateReadmeTable.cs
* Revert "Remove RegenerateReadmeTable.cs"
This reverts commit 037f425853e5587da95404f07130e36efd6cb2e3.
* BuildFPMToolPreReqs.cs is still needed for packaging Linux_x64