Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario.
* The new RID is linux-bionic-arm64/linux-bionic-x64.
* The build reuses the existing Android build dockerfiles and Helix queues
* Since we don't have JNI, we don't have Android Crypto - instead, use an Android build of OpenSSL. As an errata, it is incumbent upon the end user to supply this in their OS environment (we download one ad-hoc for testing purposes, which was compiled by Google)
* Some tests cannot be completed due to SELinux policies affecting the shell user executing tests via adb shell in the world-writable /data/local/tmp directory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones)
Closes: #66027
This change adds a function to lookup the current NSLocale and extract the language + country code to load into ICU by default. Previously, we would defer to uloc_getDefault in ICU, which would return a value we would ignore (en_US_POSIX) and result in falling back to invariant mode.
Fixes#68321
* Change the default Nullable to enabled for src projects
* Set Nullable=enable as the default for ref projects
* Fixup merge conflicts
* Disable nullable on shim projects and EventLog.Messages
* Set Nullable to blank on EventLog.Messages
This way no CodeAnalysis attributes are emitted into the assembly.
Use TargetFramework instead of TargetFrameworks property whenever a
test project targets a single target framework only.
This avoid unnecessary outer builds and evaluations and makes the build
faster.
* Fix slngen.proj
The SolutionName property is defined by the SDK and hence the condition was always true. Also the star (*) didn't expand when using the ValurOrDefault msbuild function. Fixing this by using a different name `SolutionNameOverride` and avoiding the ValueOrDefault msbuild function.
* Update solution files
Updating the solution files as those changed because of
microsoft/slngen@cb57e28 and apparently the solution files never were
updated.
* Don't use Targets* helper properties in libs projs
This change makes it possible to migrate 200+ (ref+src) projects to use
TargetFramework instead of TargetFrameworks which avoids the additional
outer build evaluation and invocation which ultimately makes the overall
build faster.
Targets* properties (i.e. TargetsWindows, TargetsAnyOS, TargetsUnix,
etc.) rely on the TargetFramework property which usually are set
inside a project. The TargetFramework property is only
available before a project specifies it if it's explicitly set in a props
file or if the project is cross-targeting and the outer-build dispatches
into the inner-build. During the dispatch, the TargetFramework property
is passed in as a global property.
Until now that behavior wasn't a problem because every libraries project
cross-targeted (by setting the TargetFrameworks property) even though
many only include a single TargetFramework (i.e. NetCoreAppCurrent).
To allow projects to use the TargetFramework property instead of
TargetFrameworks, the Targets* helper properties can't be calculated
anymore early in a props file as the TargetFramework property isn't set
at that time.
In general, the guidance by the SDK/msbuild team is to not read from the
TargetFramework property before the project sets it
(in a property group). That effectively means that the TargetFramework
property shouldn't be used in props files at all.
Therefore these helper properties can't be used anymore for property
conditions and I'm replacing their usage with TargetPlatformIdentifier
comparisons for both properties and items.
In nearly all cases, the Targets* helper properties can be replaced with
TargetPlatformIdentifier checks on items and in the few cases where
TargetsUnix or TargetsLinux marks multiple tfms as compatible, the exact
tfms must be used instead for the TargetPlatformIdentifier comparison.
Whenever a project needs to condition properties on the platform, I'm
first setting the TargetPlatformIdentifier the same way the SDK sets it
so that the SDK later doesn't need to set it again to avoid the
additional expensive msbuild function call.
* Use TargetFramework singular to avoid outer builds
Use TargetFramework instead of TargetFrameworks property whenever a
projects only targets a single target framework. This avoid unnecessary
outer builds and evaluations and makes the build faster.
* Bump version of C# compiler
This should be reverted when arcade brings in a new enough compiler.
* Fix a few new warnings from updating compiler
* Enable IDE0190 to employ parameter null checking
* Initial roll out of !!
* Fix more compiler warnings from upgrade, plus some test fixes / reverts
* Fix a few more tests
* Disable profiling test
* Move one more 20H2 queue to server 2022
Fix one more instance not covered by https://github.com/dotnet/runtime/pull/64827.
This should fix the same failure in runtime-extra-platforms.
* Update IsIcuCompatiblePlatform
* Consume renamed TargetFramework package
* Rename CoreLibs generator parent dir
Projects under src/libraries/ which are located under a "gen" directory
are automatically treated as source generator projects. Because the
CoreLib generator was placed under a different directory "generators",
it was treated as a RuntimeAssembly which gets binplaced into the
runtime path. The runtime tests then take the assemblies from there and
copy them into their CORE_ROOT directory.
Renaming the CoreLib source generators parent directory fixes that so
that it is treated as source generator and it brings consistency into
src/libraries.
Update slngen tooling to latest stable version and solution files since
a lot changed since the last time they were updated:
- NET7 (removal of older TFMs)
- Source Generators
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.
Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
Android ICU seems to have slight behavioral differences with Turkish and Slovak cultures. This change skips the data items that do have difficulty.
Additionally, there are a few other tests that were failing because the test data should have been the same as what we use on desktop. Adjusted accordingly.
Fixes#36672
* Use more string interpolation
I previously did a pass looking for opportunities. Finding a few more, as well as fixing some misuse of existing methods.
* Update src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
Co-authored-by: halgab <[email protected]>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: halgab <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
* Fix Culture Native and Display Names
* fix mono break
* Address the feedback
* Address more feedback
* Use ThreadCultureChange in the tests
* Exclude the test on mobile platfoms
* Add check for culture data in ICU
Add PredefinedOnly GlobalizationMode
Modified tests if Culture Data not found
* Add test for predefined culture env var
* change assembly test data to pl-PL to avoid culturenotfound exception
Co-authored-by: Larry Ewing <[email protected]>
* [browser][tests][outerloop] Standup OuterLoop tests on CI
* System.Collections.NonGeneric.Tests passing
* System.Console.Tests passing
* System.Diagnostics.DiagnosticSource.Tests passing
* System.Globalization.Tests passing
- See active issue https://github.com/dotnet/runtime/issues/45951
* System.IO.FileSystem.Tests passing after deactivating test cannot wait on monitors on this runtime.
* System.IO.FileSystem.Tests passing - See active issue: https://github.com/dotnet/runtime/issues/45954
* Remove fat fingered code.
* Threads not supported on Browser
* Browser does not support monitor
* Browser does not support monitor
* Browser does not support wait on monitors
* Browser does not support wait on monitors
* Add ActiveIssue for DataFlow tests TestNullTarget_CompletionNoCaching
* Add ActiveIssue for DataFlow tests
* Add ActiveIssue for DataFlow tests
* Add threading support conditional
* Change all Cannot wait on monitors on this runtime Browser platform checks to
[ConditionalXXXX(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
As was suggested in comments
* Address review comment for monitors not supported
* Address review comments
* Add threading supported condition.
```
fail: [FAIL] System.Text.Json.Serialization.Tests.EnumConverterTests.VeryLargeAmountOfEnumsToSerialize
[08:10:56] info: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
```