Repository navigation
Description
After running release build (./build.sh -c Release), the test build command (Linux or macOS):
$ src/tests/build.sh release priority1is failing with:
(logs from Linux)
/root/.nuget/packages/microsoft.net.test.sdk/16.8.0-release-20201022-02/build/netcoreapp2.1/Microsoft.NET.Test.Sdk.Program.cs(3,25): error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) [/runtime/src/tests/ilverify/ILVerification.Tests.csproj]
Same error is produced, when trying to build ILVerification.Tests.csproj directly with /runtime/.dotnet/dotnet build -c Release:
(logs from macOS)
Microsoft (R) Build Engine version 16.8.0-preview-20475-05+aed5e7ed0 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
AccessTests -> /Users/am11/projects/runtime/artifacts/tests/coreclr/OSX.x64.Release/ilverify/Tests/AccessTests.dll
InterfaceDefinition -> /Users/am11/projects/runtime/artifacts/tests/coreclr/OSX.x64.Release/ilverify/Tests/InterfaceDefinition.dll
...
...
ThisStateTests -> /Users/am11/projects/runtime/artifacts/tests/coreclr/OSX.x64.Release/ilverify/Tests/ThisStateTests.dll
ValueTypeTests -> /Users/am11/projects/runtime/artifacts/tests/coreclr/OSX.x64.Release/ilverify/Tests/ValueTypeTests.dll
/Users/am11/.nuget/packages/microsoft.net.test.sdk/16.8.0-release-20201022-02/build/netcoreapp2.1/Microsoft.NET.Test.Sdk.Program.cs(3,25): error CS0234: The type or namespace name 'TestPlatform' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) [/Users/am11/projects/runtime/src/tests/ilverify/ILVerification.Tests.csproj]without priority1, ./build.sh succeeds but there is no ILVerification.Tests.dll found anywhere under artifacts directory (recursively), although test fixtures of ilverify are compiled: AccessTestsExtern.dll, AccessTestsFriend.dll and so on.
Activity
jkotas commentedon Oct 30, 2020
I am not able to reproduce this.
am11 commentedon Oct 30, 2020
Also tried building individual project following the instructions https://github.com/dotnet/runtime/blob/117c9d6e853b722d3d1e8ae1ccdf9163d37b7adc/docs/workflow/testing/coreclr/unix-test-instructions.md#building-an-individual-test (doc still has old paths
src/coreclr/tests, instead ofsrc/tests)am11 commentedon Oct 30, 2020
Found the issue. If we build product and tests consecutively from a clean state:
then rely on:
for incremental rebuilds, and
for running the tests, it works. I once tried to build the test project from
src/tests/ilverifydirectory, which gave the aforementionedCS0234error. Once in that error state, re-runningsrc/tests/build.sh release priority1from repo root does not recover until we git-clean the repo.