summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-07 10:17:18 +0100
committerskal <pascal.massimino@gmail.com>2026-02-07 10:17:18 +0100
commit2cadafb2821ca46bd29dd82ef718302472f2eff3 (patch)
tree23cc1c0491861f77b277b366c61ce36f3598919a /scripts
parent4800e062e8ca38909ef85695ffbecc32a9d88799 (diff)
fix(ci): Update verification script to catch tool compilation failures
Problem: The spectool.cc include path bug was not caught by the test suite because check_all.sh only built tests, not tools. Root Cause Analysis: - check_all.sh used -DDEMO_BUILD_TESTS=ON only - Tools (spectool, specview, specplay) are built with -DDEMO_BUILD_TOOLS=ON - CTest runs tests but doesn't verify tool compilation - Result: Tool compilation failures went undetected Solution: Updated scripts/check_all.sh to: 1. Enable both -DDEMO_BUILD_TESTS=ON and -DDEMO_BUILD_TOOLS=ON 2. Explicitly verify all tools compile (spectool, specview, specplay) 3. Add clear output messages for each verification stage 4. Document what the script verifies in header comments Updated doc/CONTRIBUTING.md: - Added "Automated Verification (Recommended)" section - Documented that check_all.sh verifies tests AND tools - Provided manual verification steps as alternative - Clear command examples with expected behavior Verification: - Tested by intentionally breaking spectool.cc include - Script correctly caught the compilation error - Reverted break and verified all tools build successfully This ensures all future tool changes are verified before commit. Prevents regression: Similar include path issues will now be caught by pre-commit verification.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check_all.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/check_all.sh b/scripts/check_all.sh
index 91d55c4..113d3f0 100755
--- a/scripts/check_all.sh
+++ b/scripts/check_all.sh
@@ -1,13 +1,26 @@
#!/bin/bash
# This script builds and tests all supported platform targets to ensure
# stability before a major commit.
+#
+# What it verifies:
+# 1. Native build (macOS/Linux) with all tests and tools
+# 2. All 26 tests pass
+# 3. All tools compile (spectool, specview, specplay)
+# 4. Windows cross-compilation (if mingw-w64 available)
+#
+# Usage: ./scripts/check_all.sh
set -e
echo "--- Running Native Build & Tests ---"
-cmake -S . -B build -DDEMO_BUILD_TESTS=ON
+echo "Configuring with all options enabled (tests + tools)..."
+cmake -S . -B build -DDEMO_BUILD_TESTS=ON -DDEMO_BUILD_TOOLS=ON
+echo "Building all targets (demo, tests, and tools)..."
cmake --build build -j8
+echo "Running test suite..."
(cd build && ctest --output-on-failure)
+echo "Verifying tools compile..."
+cmake --build build --target spectool specview specplay -j8
echo ""
echo "--- Running Windows Cross-Compilation Build ---"