Agent Skills: DART Testing

DART testing patterns - unit tests, integration tests, CI validation

UncategorizedID: dartsim/dart/dart-test

Repository

dartsimLicense: BSD-2-Clause
1,069298

Install this agent skill to your local

pnpm dlx add-skill https://github.com/dartsim/dart/tree/HEAD/.codex/skills/dart-test

Skill Files

Browse the full folder contents for dart-test.

Download Skill

Loading file tree…

.codex/skills/dart-test/SKILL.md

Skill Metadata

Name
dart-test
Description
"DART Test: unit tests, integration tests, CI validation, and debugging"
<!-- AUTO-GENERATED FILE - DO NOT EDIT MANUALLY --> <!-- Source: .claude/skills/dart-test/SKILL.md --> <!-- Sync script: scripts/sync_ai_commands.py --> <!-- Run `pixi run sync-ai-commands` to update -->

DART Testing

Load this skill when writing or debugging tests.

Quick Commands

pixi run test         # Quick test run
pixi run test-all     # Full validation
pixi run -e cuda test-all # CUDA-enabled full validation on Linux CUDA hosts
pixi run test-unit    # Unit tests
pixi run test-py      # Python tests

Full Documentation

For complete testing guide: docs/onboarding/testing.md

For CI/CD troubleshooting: docs/onboarding/ci-cd.md

Test Organization

  • Unit tests: tests/unit/
  • Integration tests: tests/integration/
  • Regression tests: Near the code they test

Writing Tests

  1. Follow existing patterns in the test directory
  2. Use GoogleTest framework
  3. Name tests descriptively: TEST(ClassName, MethodName_Condition_ExpectedResult)

CI Validation

Before submitting PR:

pixi run lint         # Must pass
pixi run test-all     # Must pass
pixi run -e cuda test-all # Must pass on Linux CUDA hosts

Debugging Test Failures

# Run the smallest existing Pixi test task that covers the failure
pixi run test-unit

# Get CI logs
gh run view <RUN_ID> --log-failed

Gotchas

  • pixi run build builds libraries only, NOT the unit-test binaries. If you run ctest without building the test target first, you may execute stale binaries that silently pass. Build the test target before running its label, e.g. for the simulation suite: pixi run build-simulation-tests (target dart_simulation_tests) before ctest -L simulation.
  • pixi run test-all is the default-environment full gate. On Linux hosts with a visible NVIDIA CUDA runtime, also run pixi run -e cuda test-all; the CUDA run preserves the cuda Pixi environment and executes the CUDA CTest + benchmark smoke path when the runtime is detected.
  • The CUDA Pixi config auto-detects visible GPU compute capabilities for DART_CUDA_ARCHITECTURES; unsupported PTX/toolchain errors usually mean the generated CUDA architecture flags need to be checked before blaming test code.