agentleFS
NVIDIAKnown publisherNVIDIA/IsaacCapture/tests/AGENTS.md

IsaacCapture / tests

AGENTS.md438 starsChanged 31 days agoApache-2.0View on GitHub

CRITICAL: Complete the mandatory AGENTS.md preflight in ../AGENTS.md before editing here. Pytest and Catch2/CTest suites generally live under this tree: Organize by product area, mirroring src/ and examples/: Shared C++ fixtures (not executables) live under tests/cpp/viz/support/ (viz::test_support, viz::layers_testing). - Catch2 executable names stay stable: schema_tests, viz_core_tests, viz_layers_tests, … CI globs viz_*_tests for GPU packaging. - CTest name prefixes stay stable: schema_*, retargeting_*, viz_python_*, etc. - Catch2 tags → CTest labels via ADD_TAGS_AS_LABELS (unit, gpu, xr). - Each leaf directory has…

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After updating CloudXR import or mock-patch paths for the isaaccapture package, run ruff format on the touched tests.

    line 45
  2. Very specific:

    Use raw strings for regular-expression patterns passed to pytest.raises(..., match=...).

    line 50
  3. Very specific:

    Use repo_paths.py for paths into src/python/ or examples/ from conftest.py — do not hard-code parents[N] against repo depth.

    line 55
  4. Very specific:

    If CMake under examples/ reads a file under tests/, guard it on the in-tree configure: standalone wheel builds use the example as …

    line 57
  5. Very specific:

    Add sources + leaf CMakeLists.txt (copy an existing sibling).

    line 70
  6. Very specific:

    Do not colocate new pytest/Catch2 trees under src/ or examples/.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 -->

Agent notes — tests/

CRITICAL: Complete the mandatory AGENTS.md preflight in ../AGENTS.md before editing here.

Layout

Pytest and Catch2/CTest suites generally live under this tree:

tests/
  cpp/       ← Catch2 executables (one target per module leaf)
  python/    ← pytest suites (one pyproject.toml per leaf)

Organize by product area, mirroring src/ and examples/:

AreaC++ pathPython path
coretests/cpp/core/<module>/tests/python/core/<module>/
viztests/cpp/viz/<module>/tests/python/viz/
pluginstests/cpp/plugins/<plugin>/—
examples—tests/python/examples/<example>/

Shared C++ fixtures (not executables) live under tests/cpp/viz/support/ (viz::test_support, viz::layers_testing).

Naming invariants (CI depends on these)

  • Catch2 executable names stay stable: schema_tests, viz_core_tests, viz_layers_tests, … CI globs viz_*_tests for GPU packaging.
  • CTest name prefixes stay stable: schema_*, retargeting_*, viz_python_*, etc.
  • Catch2 tags → CTest labels via ADD_TAGS_AS_LABELS (unit, gpu, xr).

Python conventions

  • Each leaf directory has its own pyproject.toml so uv run resolves deps locally (mujoco pins, asyncio, cupy extras, grounding/wuji extras).
  • After updating CloudXR import or mock-patch paths for the isaaccapture package, run ruff format on the touched tests; longer paths can change multiline layout.
  • Format changed Python tests before staging; if pre-commit rewrites a file, restage the result and rerun the full hook set.
  • Use raw strings for regular-expression patterns passed to pytest.raises(..., match=...); Ruff rejects escaped metacharacters in ordinary strings.
  • CTest runs one pytest invocation per test_*.py with WORKING_DIRECTORY set to that leaf.
  • Use repo_paths.py for paths into src/python/ or examples/ from conftest.py — do not hard-code parents[N] against repo depth.
  • If CMake under examples/ reads a file under tests/, guard it on the in-tree configure: standalone wheel builds use the example as CMAKE_SOURCE_DIR, not the repo root.
  • A stand-in child process must stay alive on its own (python -m <builtin> exits at once), and Popen() can return while the child's /proc/<pid>/cmdline still reads empty or the parent's argv: wait for the child's own argv before any check, including one that expects no match, which either stale value passes without testing anything (python/core/cloudxr/test_background.py does both).

Adding tests

  1. Pick the matching tests/{cpp,python}/<area>/<module>/ leaf (create it if new).
  2. Add sources + leaf CMakeLists.txt (copy an existing sibling).
  3. Wire the leaf from the parent CMakeLists.txt under the same BUILD_* gates as before (e.g. viz tests require BUILD_VIZ).
  4. Do not colocate new pytest/Catch2 trees under src/ or examples/.
  • FlatBuffers generated VT_* constants are vtable offsets, not schema field IDs. Compare them with (field_id + 2) * 2, as the existing schema tests do.

Out of scope here

  • Vehicle teleop worker tests belong in examples/vehicle_teleop/tests/, alongside the example they exercise.
  • src/core/codegen/test_*.py — unittest, co-located with the generator.
  • tests/python/xr_runtime/ — standalone scripts for CloudXR GPU CI, not pytest: no pyproject.toml or CTest wiring. scripts/run_tests_with_cloudxr.sh lists the ones CI runs.
  • ROS2 Docker integration helpers under examples/teleop_ros2/.../integration_tests/.
  • scripts/sbom/tests/ — the SBOM collector's tests, run from its own uv project.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.