Skip to content

Doc tests slow to run #1703

@overlookmotel

Description

@overlookmotel

Checklist

Describe your issue

On latest Rust (1.90.0) doc tests do run successfully under cross (see #225). However, they're slow.

From our CI logs running cross test --workspace --all-features --target s390x-unknown-linux-gnu:

all doctests ran in 52.48s; merged doctests compilation took 0.84s

https://github.com/oxc-project/oxc/actions/runs/17892348345/job/50874447470#step:5:2553

Without cross-compilation, these doctests run in about ~8s.

Here's the Github Actions workflow using cross: https://github.com/oxc-project/oxc/blob/01859848b19aeb68d55f03418a0e3c08fc37b05a/.github/workflows/ci.yml#L113-L127

I also noticed this in the logs:

WARNING: No rustdoc doctest environment variable provided so doctests will be run in the same process

I'm not sure what this means! But is it possible that what's happening is the old behavior of compiling each doctest as an individual executable? (rather than newer behavior of compiling all doc tests into a single file rust-lang/rust#126245)

What target(s) are you cross-compiling for?

s390x-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

0.2.5

Example

No response

Additional information / notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions