Skip to content

CloudXR service tests can only run against a mocked runtime; no GPU path for src/core/cloudxr_tests #931

Description

@jiwenc-nv

Problem

src/core/cloudxr_tests and src/core/rig_tests run only under ctest on GitHub-hosted, GPU-less runners, so every test that touches the runtime has to fake one: a hand-bound unix socket for is_runtime_live(), a mocked Popen for the runtime process, and now a patched runtime_version() (it dlopens libcloudxr, which needs libcuda). At that point we are testing the mocks as much as the service. Nothing verifies that service start really detaches, that stop really tears the runtime down, or that status reads a real /proc cmdline.

What already exists

  • GPU runners: [self-hosted, linux, gpu, x64|arm64], used by test-viz-gpu, test-cloudxr, test-teleop-ros2. Gated only on needs: build-ubuntu, so they do run on PRs.
  • ctest never runs on them. It runs only in build-ubuntu, unfiltered.
  • test-viz-gpu is the precedent worth copying: viz python tests carry pytestmark = skipif(not _gpu_available()), skip cleanly on the CPU runner, and the same files are re-run with pytest against the built wheel on the GPU runner.
  • test-cloudxr cannot host these as-is — the runtime is a separate compose service and the run dir is mounted :ro, so no lifecycle test can write to it.

Direction

Add a real-runtime tier to cloudxr_tests that skips when no runtime is available, and run it on the GPU runner the way test-viz-gpu runs the viz suite. Keep mocks only for branches a real runtime cannot produce (wedged service, stale pid).

Related: #880 (hand-registered GPU example tests — same root cause on the examples/ side). Stubs introduced by #927.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    TBD

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions