docs: add agent skill guides and update CMake build instructions
This commit is contained in:
34
.agents/skills/testing_guide.md
Normal file
34
.agents/skills/testing_guide.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Skill: Standardized Testing & Validation
|
||||
|
||||
This skill provides the standard workflow for testing and validating changes in the `uLib` project.
|
||||
|
||||
## Context
|
||||
- **Tooling**: `ctest` and direct execution of test binaries in the `build/` directory.
|
||||
- **Location**: Test binaries are typically located in `build/src/*/testing/` or `build/Testing/`.
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Running All Tests
|
||||
From the root directory:
|
||||
```bash
|
||||
ctest --test-dir build/clang-make --output-on-failure
|
||||
```
|
||||
|
||||
### 2. Running Component Tests
|
||||
Run specific categories of tests:
|
||||
- **Core**: `./build/clang-make/src/Core/testing/CoreTest`
|
||||
- **Math**: `./build/clang-make/src/Math/testing/MathVectorTest`
|
||||
- **Geant**: `./build/clang-make/src/HEP/Geant/testing/GeantApp`
|
||||
- **VTK**: `./build/clang-make/src/Vtk/testing/vtkViewerTest`
|
||||
|
||||
### 3. Debugging a Failing Test
|
||||
Run the binary directly through `gdb` or `valgrind` (if available):
|
||||
```bash
|
||||
gdb --args ./build/clang-make/src/Core/testing/ObjectWrapperTest
|
||||
```
|
||||
|
||||
## Validation Checklist for New Features
|
||||
- [ ] Does `ctest` pass globally?
|
||||
- [ ] If changing visualization, does `vtkViewerTest` show the correct results?
|
||||
- [ ] If changing Geant logic, does `GeantApp` run without memory aborts?
|
||||
- [ ] Are new tests added to the appropriate `CMakeLists.txt`?
|
||||
Reference in New Issue
Block a user