mirror of
https://github.com/encounter/wibo.git
synced 2026-07-11 06:18:48 -07:00
CMakePresets: Rename ctest presets
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
- `cmake --preset debug` configures a 32-bit toolchain; ensure multilib packages are present. (`--preset release` for optimized builds.)
|
||||
- `cmake --build --preset debug` compiles the program and tests.
|
||||
- `./build/debug/wibo /path/to/program.exe` runs a Windows binary. Use `-D` (or `WIBO_DEBUG=1`) for verbose logging. Use `-C` to set the working directory.
|
||||
- `ctest --preset fixtures` runs the self-checking WinAPI fixtures (requires `i686-w64-mingw32-gcc` and `i686-w64-mingw32-windres`).
|
||||
- `ctest --preset debug` runs the self-checking WinAPI fixtures (requires `i686-w64-mingw32-gcc` and `i686-w64-mingw32-windres`).
|
||||
- `clang-format -i path/to/file.cpp` and `clang-tidy -p build/debug path/to/file.cpp` keep contributions aligned with the repo's tooling.
|
||||
|
||||
## Coding Style & Naming Conventions
|
||||
@@ -31,7 +31,7 @@
|
||||
- All fixtures must self-assert; use `test_assert.h` helpers so `ctest` fails on mismatched WinAPI behaviour.
|
||||
- Update `CMakeLists.txt` to add new fixture sources, then rebuild. (`cmake --build --preset debug`)
|
||||
- ALWAYS run tests against `wine` FIRST to establish expected behaviour. (`WINEDEBUG=-all wine build/debug/test/test_<feature>.exe`)
|
||||
- Run tests against wibo with `ctest --preset fixtures`. (Or `fixtures-release` for optimized builds.)
|
||||
- Run tests against wibo with `ctest --preset debug`. (Or `release` for optimized builds.)
|
||||
|
||||
## Debugging Workflow
|
||||
- Reproduce crashes under `gdb` (or `lldb`) with `-q -batch` to capture backtraces, register state, and the faulting instruction without interactive prompts.
|
||||
|
||||
+8
-8
@@ -87,8 +87,8 @@
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "fixtures",
|
||||
"displayName": "Run fixture tests (Debug)",
|
||||
"name": "debug",
|
||||
"displayName": "Run tests (Debug)",
|
||||
"configurePreset": "debug",
|
||||
"configuration": "Debug",
|
||||
"output": {
|
||||
@@ -97,8 +97,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fixtures-release",
|
||||
"displayName": "Run fixture tests (Release)",
|
||||
"name": "release",
|
||||
"displayName": "Run tests (Release)",
|
||||
"configurePreset": "release",
|
||||
"configuration": "Release",
|
||||
"output": {
|
||||
@@ -107,8 +107,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fixtures-debug-clang",
|
||||
"displayName": "Run fixture tests (Debug, Clang)",
|
||||
"name": "debug-clang",
|
||||
"displayName": "Run tests (Debug, Clang)",
|
||||
"configurePreset": "debug-clang",
|
||||
"configuration": "Debug",
|
||||
"output": {
|
||||
@@ -117,8 +117,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fixtures-release-clang",
|
||||
"displayName": "Run fixture tests (Release, Clang)",
|
||||
"name": "release-clang",
|
||||
"displayName": "Run tests (Release, Clang)",
|
||||
"configurePreset": "release-clang",
|
||||
"configuration": "Release",
|
||||
"output": {
|
||||
|
||||
@@ -66,7 +66,7 @@ wibo -- test.exe a b c
|
||||
Self-checking Windows fixtures run through CTest. They require a 32-bit MinGW cross toolchain (`i686-w64-mingw32-gcc` and `i686-w64-mingw32-windres`).
|
||||
|
||||
```sh
|
||||
ctest --preset fixtures
|
||||
ctest --preset debug
|
||||
```
|
||||
|
||||
This will cross-compile the fixture executables, run them through `wibo`, and fail if any WinAPI expectations are not met.
|
||||
|
||||
Reference in New Issue
Block a user