Skip to content

Commit

Permalink
Merge pull request #34710 from am11/feature/docs
Browse files Browse the repository at this point in the history
Add note about building PAL tests in docs
  • Loading branch information
janvorli authored Apr 9, 2020
2 parents f034c05 + 2e0039a commit 26b6e4e
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions docs/workflow/testing/coreclr/unix-test-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ During development there are many instances where building an individual test is

## Building an Individual Test

```
/path/to/runtime/dotnet.sh msbuild src/coreclr/tests/src/path-to-proj-file /p:TargetOS=<TargetOS> /p:Configuration=<BuildType>
```sh
./dotnet.sh msbuild src/coreclr/tests/src/path-to-proj-file /p:TargetOS=<TargetOS> /p:Configuration=<BuildType>
```

## Running Tests
Expand All @@ -43,29 +43,29 @@ The following instructions assume that on the Unix machine:

`src/coreclr/build-test.sh` will have set up the `Core_Root` directory correctly after the test build.

```bash
~/runtime$ ./src/coreclr/tests/runtest.sh x64 checked
```sh
./src/coreclr/tests/runtest.sh x64 checked
```

Please use the following command for help.

```
~/runtime$ ./src/coreclr/tests/runtest.sh -h
```sh
./src/coreclr/tests/runtest.sh -h
```

### Unsupported and temporarily disabled tests

Unsupported tests outside of Windows have two annotations in their csproj to
ignore them when run.

```
```xml
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
```

This will write in the bash target to skip the test by returning a passing value if run outside Windows.

In addition:
```
```xml
<DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
```

Expand All @@ -74,16 +74,17 @@ Is used to disable the build, that way if building on Unix cycles are saved buil
PAL tests
---------

Build CoreCLR on the Unix machine.
Build CoreCLR with PAL tests on the Unix machine:

Run tests:

```
~/runtime$ src/coreclr/src/pal/tests/palsuite/runpaltests.sh ~/runtime/artifacts/obj/coreclr/Linux.x64.Debug
```sh
./src/coreclr/build-runtime.sh -skipgenerateversion -nopgooptimize \
-cmakeargs -DCLR_CMAKE_BUILD_TESTS=1
```

Test results will go into:
Run tests:

```sh
./src/coreclr/src/pal/tests/palsuite/runpaltests.sh $(pwd)/artifacts/obj/coreclr/$(uname).x64.Debug
```
/tmp/PalTestOutput/default/pal_tests.xml
```

Test results will go into: `/tmp/PalTestOutput/default/pal_tests.xml`

0 comments on commit 26b6e4e

Please sign in to comment.