Skip to content

Usage of TargetArchitecture in managed coreclr test  #83980

@kunalspathak

Description

@kunalspathak

Today we use TargetArchitecture to conditionally include or exclude a test project. However, we build universal test projects that should be run for AnyCPU. We build it on linux-x64 or osx-x64 and end up passing TargetArchitecture=x64.

- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) $(testTreeFilterArg) ci /p:TargetOS=AnyOS

As such, the test projects that checks for TargetArchitecture=arm64, etc. will never become true. Recently we found out in #83947 that Arm64 were never run since October 2022.

Come up a way by splitting the build of test projects to be target specific. This is needed so we can enable only the tests that are relevant on the supported architecture. This will save us some test execution time.

Update disabling-tests.md doc accordingly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions