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

Improve docs on building ILVerify #111851

Merged
merged 7 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
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
19 changes: 17 additions & 2 deletions src/coreclr/tools/ILVerify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,39 @@ The test project itself is under [src/tests/ilverify](../../../tests/ilverify)

General instructions to build this library can be found [here](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/coreclr/testing.md).

As quick snippet which should be enough to build CoreCLR
```
./build.cmd -s clr.native+clr.corelib+clr.tools+clr.nativecorelib+libs -c release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this significantly better than just -s clr+libs?

```

As the test project is marked with priority=1, simply building the test projects from the root of the project is not enough. For the initial build of priority=1 in release mode, run the following:

```sh
src/tests/build.(cmd/sh) release -priority=1
```

or significantly faster use only
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing instructions can be deleted. I guess they were written before the test build had tree option.

```
src/tests/build.cmd release tree ilverify
```

It is important to not attempt to build the test project using `dotnet build` or `dotnet test`, as this will invalidate the state of the build and requires a full rebuild of both (see this [issue](https://github.com/dotnet/runtime/issues/43967)).

To incrementally build the ILVerify tests in isolation, run the following:

```sh
dotnet.(cmd/sh) msbuild ./src/tests/ilverify/ILVerification.Tests.csproj /p:Configuration=Release
dotnet.(cmd/sh) msbuild ./src/tests/ilverify/ILVerificationTests.csproj /p:Configuration=Release
```

In order to run the tests, execute:

on Linux
```sh
artifacts/tests/coreclr/(windows/linux).x64.Release/ilverify/ILVerification.Tests.(cmd/sh) -coreroot=artifacts/tests/coreclr/(windows/linux).x64.Release/Tests/Core_Root
artifacts/tests/coreclr/(windows/linux).x64.Release/ilverify/ILVerificationTests.sh -coreroot=<repo_root>artifacts/tests/coreclr/(windows/linux).x64.Release/Tests/Core_Root
```
on Windows
```shell
artifacts\tests\coreclr/\(windows/linux).x64.Release/ilverify/ILVerificationTests.cmd -coreroot=<repo_root>artifacts\tests\coreclr\(windows/linux).x64.Release\Tests\Core_Root
```


Expand Down
Loading