Skip to content
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

[Doc][Mono] Updated testing document to use clr.hosts; remove references to special mono targets #62588

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions docs/workflow/testing/mono/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Before running tests, [build Mono](../../building/mono/README.md) using the desi

To build the runtime tests for Mono JIT or interpreter:

1. Build CoreCLR - the `clr.native` subset is enough but you can build the whole thing, optionally. From the `$(REPO_ROOT)`:
1. Build test host (corerun) - From the `$(REPO_ROOT)`:

```
./build.sh clr.native -c <release|debug>
./build.sh clr.hosts -c <release|debug>
```

2. Build the tests (in `$(REPO_ROOT)/src/tests`)
Expand All @@ -26,25 +26,23 @@ For example: `./build.sh excludemonofailures release -test:JIT/opt/InstructionCo

Run individual test:
```
cd src/mono
make run-tests-coreclr CoreClrTest="bash ../../artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh"
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 tests:
Run all built tests:
```
cd src/mono
make run-tests-coreclr-all
./run.sh <Debug|Release>
```

To debug a single test with `lldb`:

1. Run the test at least once normally (or manually run the `mono.proj` `PatchCoreClrCoreRoot` target)
2. Run the shell script for the test case manually:
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
```
3. In LLDB add the debug symbols for mono: `add-dsym <CORE_ROOT>/libcoreclr.dylib.dwarf`
4. Run/debug the test
2. In LLDB add the debug symbols for mono: `add-dsym <CORE_ROOT>/libcoreclr.dylib.dwarf`
3. Run/debug the test


### WebAssembly:
Build the runtime tests for WebAssembly
Expand Down