chore(cpp): script run_tests.sh para build+ctest one-shot
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build and run all C++ unit tests via Catch2 + ctest.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cmake -S "$ROOT" -B "$ROOT/build" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
|
||||
cmake --build "$ROOT/build" -j"$(nproc)"
|
||||
ctest --test-dir "$ROOT/build" --output-on-failure
|
||||
Reference in New Issue
Block a user