Skip to content

Wrong crossgen2 binary in artifacts/tests #80110

Closed
@am11

Description

@am11

Problem

The crossgen2 binary shipped in microsoft.netcore.app.crossgen2 nuget package is not the binary we are testing in CI.

Details

We publish crossgen2 as a NativeAOT app on AOT supported platforms and as a SingleFile app on $other platforms.

e.g. microsoft.netcore.app.crossgen2.osx-arm64 nuget package v8.0.0-alpha.1.22605.1 has AOT'd crossgen2 executable under tools/ directory.

With build clr+libs followed by src/tests/build, the non-published (non-AOT, non-SingleFile) variant is copied at artifacts/tests/coreclr/<rid>.<configuration>/Tests/Core_Root/crossgen2/crossgen2 which we use in test runs.

With build clr+libs+packs followed by src/tests/build, both non-published and published variants are copied in artifacts/tests/coreclr/<rid>.<configuration>/Tests/Core_Root/crossgen2 (non-published at ./crossgen2 and published at ./publish/<rid>/crossgen2) and we still use non-published variant during the test runs.

Proposed changes

  • src/tests/build to always copy published variant of CG2 to artifacts (and publish it anyway if packs subset wasn't built):
    artifacts/bin/coreclr/<rid>.<configuration>/crossgen2/<rid>/publish/*.* ->
    artifacts/tests/coreclr/<rid>.<configuration>/Tests/Core_Root/crossgen2/ (no need to copy non-published variant)
  • test runner and places like R2RTest tool which are spawning dotnet crossgen2.dll or corerun crossgen2.dll to spawn crossgen2 executable instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Infrastructure-coreclrin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions