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

Updated mono testing doc #44360

Merged
merged 23 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
51241f1
Update testing.md
fanyang-mono Nov 6, 2020
5afb1da
Create testing-mono.md
fanyang-mono Nov 6, 2020
6a6d421
Update mono testing doc
fanyang-mono Nov 6, 2020
5ebf8af
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
8f38660
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
4dcfce5
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
94d1c90
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
5d0fd91
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
0c664e8
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
031a857
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
4309c23
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
ae3b8bb
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 11, 2020
c538bd2
PR feedback
fanyang-mono Nov 11, 2020
bdf7016
Fix format
fanyang-mono Nov 13, 2020
e5a377e
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 17, 2020
270a938
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 17, 2020
cecd564
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 17, 2020
3b24c94
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 17, 2020
121e5c3
PR feedback
fanyang-mono Nov 17, 2020
bb6844e
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 20, 2020
0bc668a
Update docs/workflow/testing/mono/testing.md
fanyang-mono Nov 20, 2020
3c6e23f
Replace bullet points with sub-headers
fanyang-mono Nov 20, 2020
6d1918c
Update sub-headers to remove the duplicated part
fanyang-mono Nov 20, 2020
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
Prev Previous commit
Next Next commit
Update mono testing doc
  • Loading branch information
fanyang-mono committed Nov 6, 2020
commit 6a6d4214f3499a57cc52bb9c9e7d2cf648fe9ec9
46 changes: 0 additions & 46 deletions docs/workflow/testing/coreclr/testing-mono.md

This file was deleted.

55 changes: 50 additions & 5 deletions docs/workflow/testing/mono/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,52 @@ Before running any tests, build mono in the way that you would like to test with
See the instructions for [Building Mono](../../building/mono/README.md)

## Running Runtime Tests
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
* Build and run runtime tests against Mono JIT:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

See the instructions for [Running runtime tests with Mono](../coreclr/testing-mono.md) Plus, there are additional mono runtime tests in mono/mono, but they
have not been moved over yet.
* Build and run one specific runtime test. From the root directory run the following command:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
cd src/mono/netcore
make run-tests-coreclr CoreClrTest="bash ../../artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh"
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```

* Build and run all runtime tests. From the root directory run the following command:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
cd src/mono/netcore
make run-tests-coreclr-all
```

* Build and run runtime tests for Webassembly. From the root directory run the following command:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
src/tests/build.sh -skipstressdependencies -excludemonofailures os Browser wasm <Release/Debug>
```
* From the last few lines of the build log, you will see something like this
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
--------------------------------------------------
Example run.sh command

src/tests/run.sh --coreOverlayDir=<repo_root>artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root --testNativeBinDir=<repo_root>/artifacts/obj/coreclr/Browser.wasm.Release/tests --testRootDir=<repo_root>/artifacts/tests/coreclr/Browser.wasm.Release --copyNativeTestBin Release
--------------------------------------------------
```
* To run the tests, copy that command and add `wasm` at the end.
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

* Build and run Runtime Tests for Android x64. From the root directory run the following command:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
src/tests/build.sh -skipstressdependencies -excludemonofailures os Android x64 <Release/Debug>
```
* From the last few lines of the build log, you will see something like this
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
```
--------------------------------------------------
Example run.sh command

src/tests/run.sh --coreOverlayDir=<repo_root>artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root --testNativeBinDir=<repo_root>/artifacts/obj/coreclr/Browser.wasm.Release/tests --testRootDir=<repo_root>/artifacts/tests/coreclr/Browser.wasm.Release --copyNativeTestBin Release
--------------------------------------------------
```
* To run the tests, copy that command and add `Android` at the end.

* For more details about the nature of the runtime tests, please refer to [Coreclr testing documents](../coreclr)
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

## Running Library Tests
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
Running library tests against Mono is straightforward regardless of configuration. Simply run the following commands:
* Build and run library tests against Mono JIT:
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

1. cd into the test library of your choice (`cd src/libraries/<library>/tests`)

Expand All @@ -19,9 +59,14 @@ Running library tests against Mono is straightforward regardless of configuratio
dotnet build /t:Test /p:RuntimeFlavor=mono /p:Configuration=<Release/Debug>
```

* Build and run library tests against Webassembly. See instructions for [Testing Webassembly](../libraries/testing-wasm.md)
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

* Build and run library tests against Android. See instructions for [Testing Android](../libraries/testing-android.md)

* Build and run library tests against iOS. See instructions for [Testing iOS](../libraries/testing-apple.md)

# Test with sample program
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved
There is a HelloWorld sample program lives at
fanyang-mono marked this conversation as resolved.
Show resolved Hide resolved

```
$(REPO_ROOT)/src/mono/netcore/sample/HelloWorld
```
Expand All @@ -34,5 +79,5 @@ To run that program, you could simply cd to that directory and execute
make run
```

Note that, it is configured with run with Release and LLVM mode by default. If you would like to work with other modes,
Note that, it is configured with run with `Release` and `LLVM` mode by default. If you would like to work with other modes,
you could edit the Makefile from that folder.