Agent Skills
› dartsim/dart
› dart-test
dart-test
GitHub指导编写、运行和调试 DART 项目的单元测试与集成测试。涵盖 pixi 命令使用、GoogleTest 规范、CI 验证流程及 CUDA 环境配置,并提供构建陷阱排查指南。
Trigger Scenarios
编写或调试 C++/Python 测试
执行 CI/CD 验证
排查测试失败原因
配置 CUDA 测试环境
Install
npx skills add dartsim/dart --skill dart-test -g -y
SKILL.md
Frontmatter
{
"name": "dart-test",
"description": "DART Test: unit tests, integration tests, CI validation, and debugging"
}
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
- Follow existing patterns in the test directory
- Use GoogleTest framework
- 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 buildbuilds libraries only, NOT the unit-test binaries. If you runctestwithout 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(targetdart_simulation_tests) beforectest -L simulation.pixi run test-allis the default-environment full gate. On Linux hosts with a visible NVIDIA CUDA runtime, also runpixi run -e cuda test-all; the CUDA run preserves thecudaPixi 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.
Version History
- e0d13fd Current 2026-07-05 10:36


