mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-11 02:13:38 +09:00
Lowercase TargetOS (#80164)
Follow-up on #32451 Follow-up on #80074 In #43651, the "Windows" OS name was lowercased to achieve target frameworks with RIDs in them. At that time, the original plan was to lowercase all TargetOS values but that had to be cut because of resources. This PR finishes that and updates build systems, YML, markdowns and managed components. To not break existing developer workflows, the passed-in -os value is automatically lower-cased in the script entry points and validated in the msbuild entry point.
This commit is contained in:
parent
5385f045f9
commit
2ca7cf7140
324 changed files with 1980 additions and 1981 deletions
|
@ -77,7 +77,7 @@ anyway.
|
|||
|
||||
During development there are many instances where building an individual test is fast and necessary. All of the necessary tools to build are under `coreclr`. It is possible to use `~/runtime/dotnet.sh msbuild` as you would normally use MSBuild with a few caveats.
|
||||
|
||||
**!! Note !! -- Passing /p:TargetOS=[OSX|Linux] is required.**
|
||||
**!! Note !! -- Passing /p:TargetOS=[osx|linux] is required.**
|
||||
|
||||
## Building an Individual Test
|
||||
|
||||
|
@ -149,12 +149,12 @@ Run tests:
|
|||
To run all tests including disabled tests
|
||||
```sh
|
||||
./src/coreclr/pal/tests/palsuite/runpaltests.sh $(pwd)/artifacts/bin/coreclr/$(uname).x64.Debug/paltests
|
||||
# on macOS, replace $(uname) with OSX
|
||||
# on macOS, replace $(uname) with osx
|
||||
```
|
||||
To only run enabled tests for the platform the tests were built for:
|
||||
```sh
|
||||
artifacts/bin/coreclr/$(uname).x64.Debug/paltests/runpaltests.sh $(pwd)/artifacts/bin/coreclr/$(uname).x64.Debug/paltests
|
||||
# on macOS, replace $(uname) with OSX
|
||||
# on macOS, replace $(uname) with osx
|
||||
```
|
||||
To run only specific tests, edit paltestlist.txt locally to delete the ones you don't want to run.
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ Use this attribute on test methods to specify that this test may only be run on
|
|||
|
||||
When running tests by building a test project, tests that don't apply to the `TargetOS` are not run. For example, to run Linux-specific tests on a Linux box, use the following command line:
|
||||
```sh
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=Linux
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=linux
|
||||
```
|
||||
To run all Linux-compatible tests that are failing:
|
||||
```sh
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=Linux /p:WithCategories=failing
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=linux /p:WithCategories=failing
|
||||
```
|
||||
|
||||
This attribute is defined [here](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/PlatformSpecificAttribute.cs).
|
||||
|
@ -232,7 +232,7 @@ dotnet build <csproj_file> /t:Test /p:TargetOS=windows
|
|||
```
|
||||
- Run all outer loop tests acceptable on OS X that are currently associated with active issues:
|
||||
```sh
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=OSX /p:WithCategories="OuterLoop;failing""
|
||||
dotnet build <csproj_file> /t:Test /p:TargetOS=osx /p:WithCategories="OuterLoop;failing""
|
||||
```
|
||||
|
||||
## SkipOnCoreClrAttribute
|
||||
|
|
|
@ -68,11 +68,11 @@ export ANDROID_NDK_ROOT=<PATH-TO-ANDROID-NDK>
|
|||
|
||||
Now we're ready to build everything for Android:
|
||||
```
|
||||
./build.sh mono+libs -os Android -arch x64
|
||||
./build.sh mono+libs -os android -arch x64
|
||||
```
|
||||
and even run tests one by one for each library:
|
||||
```
|
||||
./build.sh libs.tests -os Android -arch x64 -test
|
||||
./build.sh libs.tests -os android -arch x64 -test
|
||||
```
|
||||
Make sure an emulator is booted (see [`AVD Manager`](#avd-manager)) or a device is plugged in and unlocked.
|
||||
`AVD Manager` tool recommends to install `x86` images by default so if you follow that recommendation make sure `-arch x86` was used for the build script.
|
||||
|
@ -80,7 +80,7 @@ Make sure an emulator is booted (see [`AVD Manager`](#avd-manager)) or a device
|
|||
### Running individual test suites
|
||||
The following shows how to run tests for a specific library
|
||||
```
|
||||
./dotnet.sh build /t:Test src/libraries/System.Numerics.Vectors/tests /p:TargetOS=Android /p:TargetArchitecture=x64
|
||||
./dotnet.sh build /t:Test src/libraries/System.Numerics.Vectors/tests /p:TargetOS=android /p:TargetArchitecture=x64
|
||||
```
|
||||
|
||||
### Running the functional tests
|
||||
|
@ -89,7 +89,7 @@ There are [functional tests](https://github.com/dotnet/runtime/tree/main/src/tes
|
|||
|
||||
A functional test can be run the same way as any library test suite, e.g.:
|
||||
```
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=Android /p:TargetArchitecture=x64 src/tests/FunctionalTests/Android/Device_Emulator/PInvoke/Android.Device_Emulator.PInvoke.Test.csproj
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=android /p:TargetArchitecture=x64 src/tests/FunctionalTests/Android/Device_Emulator/PInvoke/Android.Device_Emulator.PInvoke.Test.csproj
|
||||
```
|
||||
|
||||
Currently functional tests are expected to return `42` as a success code so please be careful when adding a new one.
|
||||
|
@ -147,7 +147,7 @@ ${ANDROID_SDK_ROOT}/emulator/emulator -avd ${EMULATOR_NAME_X64} &
|
|||
The emulator can be launched with a variety of options. Run `emulator -help` to see the full list.
|
||||
|
||||
### Existing Limitations
|
||||
- `-os Android` is not supported for Windows yet (`WSL` can be used instead)
|
||||
- `-os android` is not supported for Windows yet (`WSL` can be used instead)
|
||||
- XHarness.CLI is not able to boot emulators yet (so you need to boot via `AVD Manager` or IDE)
|
||||
- AOT and Interpreter modes are not supported yet
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ Run the following command in a terminal:
|
|||
./build.sh mono+libs -os <TARGET_OS> -arch <TARGET_ARCHITECTURE>
|
||||
```
|
||||
where `<TARGET_OS>` is one of the following:
|
||||
- iOSSimulator
|
||||
- tvOSSimulator
|
||||
- MacCatalyst
|
||||
- iOS
|
||||
- tvOS
|
||||
- iossimulator
|
||||
- tvossimulator
|
||||
- maccatalyst
|
||||
- ios
|
||||
- tvos
|
||||
|
||||
and `<TARGET_ARCHITECTURE>` is one of the following:
|
||||
- x64
|
||||
|
@ -30,12 +30,12 @@ and `<TARGET_ARCHITECTURE>` is one of the following:
|
|||
|
||||
e.g., to build for an iOS simulator, run:
|
||||
```
|
||||
./build.sh mono+libs -os iOSSimulator -arch x64
|
||||
./build.sh mono+libs -os iossimulator -arch x64
|
||||
```
|
||||
|
||||
Run tests one by one for each test suite on a simulator:
|
||||
```
|
||||
./build.sh libs.tests -os iOSSimulator -arch x64 -test
|
||||
./build.sh libs.tests -os iossimulator -arch x64 -test
|
||||
```
|
||||
|
||||
### Building for a device
|
||||
|
@ -46,7 +46,7 @@ In order to run the tests on a device:
|
|||
|
||||
For example:
|
||||
```
|
||||
./build.sh libs.tests -os iOS -arch x64 -test /p:DevTeamProvisioning=H1A2B3C4D5
|
||||
./build.sh libs.tests -os ios -arch x64 -test /p:DevTeamProvisioning=H1A2B3C4D5
|
||||
```
|
||||
Other possible options are:
|
||||
- to sign with an adhoc key by setting `/p:DevTeamProvisioning=adhoc`
|
||||
|
@ -58,7 +58,7 @@ Other possible options are:
|
|||
|
||||
- The following shows how to run tests for a specific library:
|
||||
```
|
||||
./dotnet.sh build src/libraries/System.Numerics.Vectors/tests /t:Test /p:TargetOS=iOS /p:TargetArchitecture=x64
|
||||
./dotnet.sh build src/libraries/System.Numerics.Vectors/tests /t:Test /p:TargetOS=ios /p:TargetArchitecture=x64
|
||||
```
|
||||
|
||||
Also you can run the built test app through Xcode by opening the corresponding `.xcodeproj` and setting up the right scheme, app, and even signing if using a local device.
|
||||
|
@ -84,7 +84,7 @@ There are [functional tests](https://github.com/dotnet/runtime/tree/main/src/tes
|
|||
|
||||
A functional test can be run the same way as any library test suite, e.g.:
|
||||
```
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=iOSSimulator /p:TargetArchitecture=x64 src/tests/FunctionalTests/iOS/Simulator/PInvoke/iOS.Simulator.PInvoke.Test.csproj
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=iossimulator /p:TargetArchitecture=x64 src/tests/FunctionalTests/iOS/Simulator/PInvoke/iOS.Simulator.PInvoke.Test.csproj
|
||||
```
|
||||
|
||||
Currently functional tests are expected to return `42` as a success code so please be careful when adding a new one.
|
||||
|
|
|
@ -49,31 +49,31 @@ PATH=/Users/<your_user>/.geckodriver:$PATH
|
|||
|
||||
Now we're ready to build everything for WebAssembly (for more details, please read [this document](../../building/libraries/webassembly-instructions.md#building-everything)):
|
||||
```bash
|
||||
./build.sh -os Browser -c Release
|
||||
./build.sh -os browser -c Release
|
||||
```
|
||||
and even run tests one by one for each library:
|
||||
```
|
||||
./build.sh libs.tests -test -os Browser -c Release
|
||||
./build.sh libs.tests -test -os browser -c Release
|
||||
```
|
||||
|
||||
### Running individual test suites using JavaScript engine
|
||||
The following shows how to run tests for a specific library
|
||||
```
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
```
|
||||
|
||||
### Running outer loop tests using JavaScript engine
|
||||
|
||||
To run all tests, including "outer loop" tests (which are typically slower and in some test suites less reliable, but which are more comprehensive):
|
||||
```
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:Outerloop=true
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:Outerloop=true
|
||||
```
|
||||
|
||||
### Running tests using different JavaScript engines
|
||||
It's possible to set a JavaScript engine explicitly by adding `/p:JSEngine` property:
|
||||
|
||||
```
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:JSEngine=SpiderMonkey
|
||||
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:JSEngine=SpiderMonkey
|
||||
```
|
||||
|
||||
At the moment supported values are:
|
||||
|
@ -89,7 +89,7 @@ The following shows how to run tests for a specific library
|
|||
|
||||
- CLI
|
||||
```
|
||||
XHARNESS_COMMAND=test-browser ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
XHARNESS_COMMAND=test-browser ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
```
|
||||
- Makefile target `run-browser-tests-<test>`
|
||||
```
|
||||
|
@ -114,7 +114,7 @@ To run all tests, including "outer loop" tests (which are typically slower and i
|
|||
|
||||
- CLI
|
||||
```
|
||||
XHARNESS_COMMAND=test-browser ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:Outerloop=true
|
||||
XHARNESS_COMMAND=test-browser ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:Outerloop=true
|
||||
```
|
||||
|
||||
- Makefile target `run-browser-tests-<test>`
|
||||
|
@ -128,7 +128,7 @@ It's possible to set a Browser explicitly by adding `--browser=` command line ar
|
|||
|
||||
- CLI
|
||||
```
|
||||
XHARNESS_COMMAND="test-browser --browser=safari" ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
XHARNESS_COMMAND="test-browser --browser=safari" ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
```
|
||||
|
||||
- Makefile target `run-browser-tests-<test>`
|
||||
|
@ -154,7 +154,7 @@ that includes the expensive AOT step.
|
|||
inputs.
|
||||
|
||||
- To recreate a similar build+test run locally, add `/p:BuildAOTTestsOnHelix=true` to the usual command line.
|
||||
- For example, with `./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release`
|
||||
- For example, with `./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=browser /p:TargetArchitecture=wasm /p:Configuration=Release`
|
||||
|
||||
- AOT: add `/p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true /p:BuildAOTTestsOnHelix=true`
|
||||
- Only trimming (helpful to isolate issues caused by trimming):
|
||||
|
|
|
@ -26,7 +26,7 @@ For example: `./build.sh mono release -test:JIT/opt/InstructionCombining/DivToMu
|
|||
|
||||
Run individual test:
|
||||
```
|
||||
bash ./artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh -coreroot=`pwd`/artifacts/tests/coreclr/OSX.x64.Release/Tests/Core_Root
|
||||
bash ./artifacts/tests/coreclr/osx.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh -coreroot=`pwd`/artifacts/tests/coreclr/osx.x64.Release/Tests/Core_Root
|
||||
```
|
||||
|
||||
Run all built tests:
|
||||
|
@ -38,7 +38,7 @@ To debug a single test with `lldb`:
|
|||
|
||||
1. Run the shell script for the test case manually with the `-debug` option:
|
||||
```
|
||||
bash ./artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh -coreroot=`pwd`/artifacts/tests/coreclr/OSX.x64.Release/Tests/Core_Root -debug=/usr/bin/lldb
|
||||
bash ./artifacts/tests/coreclr/osx.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh -coreroot=`pwd`/artifacts/tests/coreclr/osx.x64.Release/Tests/Core_Root -debug=/usr/bin/lldb
|
||||
```
|
||||
2. In LLDB add the debug symbols for mono: `add-dsym <CORE_ROOT>/libcoreclr.dylib.dwarf`
|
||||
3. Run/debug the test
|
||||
|
@ -47,7 +47,7 @@ bash ./artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivT
|
|||
### WebAssembly:
|
||||
Build the runtime tests for WebAssembly
|
||||
```
|
||||
$(REPO_ROOT)/src/tests/build.sh -mono os Browser wasm <Release/Debug>
|
||||
$(REPO_ROOT)/src/tests/build.sh -mono os browser wasm <Release/Debug>
|
||||
```
|
||||
|
||||
The last few lines of the build log should contain something like this:
|
||||
|
@ -62,7 +62,7 @@ The last few lines of the build log should contain something like this:
|
|||
### Android:
|
||||
Build the runtime tests for Android x64/ARM64
|
||||
```
|
||||
$(REPO_ROOT)/src/tests/build.sh -mono os Android <x64/arm64> <Release/Debug>
|
||||
$(REPO_ROOT)/src/tests/build.sh -mono os android <x64/arm64> <Release/Debug>
|
||||
```
|
||||
|
||||
Run one test wrapper from repo root
|
||||
|
@ -102,7 +102,7 @@ There are the [functional tests](https://github.com/dotnet/runtime/tree/main/src
|
|||
|
||||
A functional test can be run the same way as any library test suite, e.g.:
|
||||
```
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=Android /p:TargetArchitecture=x64 src/tests/FunctionalTests/Android/Device_Emulator/PInvoke/Android.Device_Emulator.PInvoke.Test.csproj
|
||||
./dotnet.sh build /t:Test -c Release /p:TargetOS=android /p:TargetArchitecture=x64 src/tests/FunctionalTests/Android/Device_Emulator/PInvoke/Android.Device_Emulator.PInvoke.Test.csproj
|
||||
```
|
||||
|
||||
Currently the functional tests are expected to return `42` as a success code so please be careful when adding a new one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue