From 95ebc620b9325e42b3ac0acbae0808be19ad5f72 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Mon, 27 Jan 2025 11:26:24 +0500 Subject: [PATCH 1/7] Improve docs on building ILVerify --- src/coreclr/tools/ILVerify/README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index 66c09870d2584b..fc52b95e32b441 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -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 +``` + 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 +``` +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=artifacts/tests/coreclr/(windows/linux).x64.Release/Tests/Core_Root +``` +on Windows +```shell +artifacts\tests\coreclr/\(windows/linux).x64.Release/ilverify/ILVerificationTests.cmd -coreroot=artifacts\tests\coreclr\(windows/linux).x64.Release\Tests\Core_Root ``` From df36def788439149acbffdf4d4c09281a01f5d89 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Mon, 27 Jan 2025 13:02:24 +0500 Subject: [PATCH 2/7] Update src/coreclr/tools/ILVerify/README.md Co-authored-by: Jan Kotas --- src/coreclr/tools/ILVerify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index fc52b95e32b441..aa9dc8c359c2fc 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -76,7 +76,7 @@ In order to run the tests, execute: on Linux ```sh -artifacts/tests/coreclr/(windows/linux).x64.Release/ilverify/ILVerificationTests.sh -coreroot=artifacts/tests/coreclr/(windows/linux).x64.Release/Tests/Core_Root +artifacts/tests/coreclr//linux.x64.Release/ilverify/ILVerificationTests.sh -coreroot=artifacts/tests/coreclr/linux.x64.Release/Tests/Core_Root ``` on Windows ```shell From c22db9ac7b1f657a287d2a79442cbac254906345 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Mon, 27 Jan 2025 13:02:39 +0500 Subject: [PATCH 3/7] Update src/coreclr/tools/ILVerify/README.md Co-authored-by: Jan Kotas --- src/coreclr/tools/ILVerify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index aa9dc8c359c2fc..ab9cfe3ed08529 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -80,7 +80,7 @@ artifacts/tests/coreclr//linux.x64.Release/ilverify/ILVerificationTests.sh -core ``` on Windows ```shell -artifacts\tests\coreclr/\(windows/linux).x64.Release/ilverify/ILVerificationTests.cmd -coreroot=artifacts\tests\coreclr\(windows/linux).x64.Release\Tests\Core_Root +artifacts\tests\coreclr/windows.x64.Release/ilverify/ILVerificationTests.cmd -coreroot=artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root ``` From 2ae9179c8ccef2357ed6b703fd31c73204bb15ea Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Mon, 27 Jan 2025 13:04:27 +0500 Subject: [PATCH 4/7] Apply PR suggestions --- src/coreclr/tools/ILVerify/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index ab9cfe3ed08529..1bdc8c614d7cc1 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -50,18 +50,13 @@ General instructions to build this library can be found [here](https://github.co As quick snippet which should be enough to build CoreCLR ``` -./build.cmd -s clr.native+clr.corelib+clr.tools+clr.nativecorelib+libs -c release +./build.cmd -s clr+libs -c release ``` 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 -``` -src/tests/build.cmd release tree ilverify +```shell +src/tests/build.(cmd/sh) 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)). From 005a7ebbf4b22dd0cc40b25bcbd4b78ab78aa4d8 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 27 Jan 2025 10:32:22 -0800 Subject: [PATCH 5/7] Update src/coreclr/tools/ILVerify/README.md --- src/coreclr/tools/ILVerify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index 1bdc8c614d7cc1..258304bec4430e 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -71,7 +71,7 @@ In order to run the tests, execute: on Linux ```sh -artifacts/tests/coreclr//linux.x64.Release/ilverify/ILVerificationTests.sh -coreroot=artifacts/tests/coreclr/linux.x64.Release/Tests/Core_Root +artifacts/tests/coreclr/linux.x64.Release/ilverify/ILVerificationTests.sh -coreroot=artifacts/tests/coreclr/linux.x64.Release/Tests/Core_Root ``` on Windows ```shell From 937563540c3a47b2e8e9c13ee94ca4331503c60a Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 27 Jan 2025 10:32:48 -0800 Subject: [PATCH 6/7] Update src/coreclr/tools/ILVerify/README.md --- src/coreclr/tools/ILVerify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index 258304bec4430e..a850d29227ea65 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -75,7 +75,7 @@ artifacts/tests/coreclr/linux.x64.Release/ilverify/ILVerificationTests.sh -corer ``` on Windows ```shell -artifacts\tests\coreclr/windows.x64.Release/ilverify/ILVerificationTests.cmd -coreroot=artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root +artifacts\tests\coreclr\windows.x64.Release\ilverify\ILVerificationTests.cmd -coreroot=artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root ``` From 9a0cd756216df8adb2dc8e64a0549e11f67eba76 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 27 Jan 2025 16:11:58 -0800 Subject: [PATCH 7/7] Update src/coreclr/tools/ILVerify/README.md --- src/coreclr/tools/ILVerify/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/ILVerify/README.md b/src/coreclr/tools/ILVerify/README.md index a850d29227ea65..ec92aad8b9ba1d 100644 --- a/src/coreclr/tools/ILVerify/README.md +++ b/src/coreclr/tools/ILVerify/README.md @@ -53,7 +53,7 @@ As quick snippet which should be enough to build CoreCLR ./build.cmd -s clr+libs -c release ``` -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: +As the test project is marked with priority=1, simply building the test projects from the root of the project is not enough. Run the following to build ilverify tests: ```shell src/tests/build.(cmd/sh) release tree ilverify