build: headless CAD-kernel test loop, and quarantine two broken tests from it

Adds scripts/kernel-test.sh: build the libslic3r_tests target and run the CAD
kernel tags, exit code as the whole contract. Clean build 4m36s, incremental
18s, no display needed -- every [CadDocument] case builds a CadDocument,
recompute()s it and asserts on geometry.

Four things this had to get right, each found by it going wrong first:

- SLIC3R_GTK=3 and BUILD_TESTS=ON are mandatory. src/CMakeLists.txt turns
  SLIC3R_GTK into 'wx-config --toolkit=gtk<N>', so omitting it asks for
  toolkit "gtk", nothing matches, and configure dies with the thoroughly
  misleading "Could NOT find wxWidgets" -- while wx-config sits right there
  in the deps prefix, working. BUILD_TESTS=ON is what creates the target.
- Configure runs unconditionally. Guarding on "CMakeCache.txt exists" is
  wrong because a FAILED configure writes that file too, after which the
  guard skips reconfiguring forever and every later run silently reuses the
  poisoned cache, ignoring corrected flags.
- A new build volume is always built clean. Cloning a warm cache from
  another tree is a correctness trap: rsync preserves source mtimes, ninja
  compares them against foreign object timestamps, concludes everything is
  current and relinks stale objects. That produced a binary containing NO
  [CadDocument] tests at all -- while exiting 0. A green run that tests
  nothing is worse than a red one.
- --host builds where the deps image already lives, staged per volume so
  parallel workers never share a tree.

The two [known-broken] tags: "entity constraints: tangent/midpoint/symmetric/
angle" aborts inside the vendored solver (slvs/dsc.h FindById, "Cannot find
handle"), and SIGABRT is fatal to the Catch2 process -- that single case took
the suite down at 12 of 31, so a green baseline was unreachable. The thread
groove case is a plain pre-existing assertion failure. Both are excluded from
the dev loop's default filter ONLY; ctest in CI still runs and reports them,
so neither bug is hidden. Baseline is now 603 assertions / 29 cases green,
which is what makes "I broke nothing" a meaningful statement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVzKmX6Y1aEteit1HTXG4Q
This commit is contained in:
Tommaso Bianchi
2026-07-23 13:47:25 +02:00
co-authored by Claude Opus 4.8
parent 52a8ca965c
commit 3621785984
2 changed files with 115 additions and 2 deletions
+10 -2
View File
@@ -550,7 +550,12 @@ TEST_CASE("entity constraints: point-on-line positions a centre onto an axis", "
}
}
TEST_CASE("entity constraints: tangent/midpoint/symmetric/angle", "[CadDocument]")
// [known-broken]: the "tangent line to circle" SECTION below aborts inside the vendored
// solver (slvs/dsc.h FindById, "Cannot find handle"). SIGABRT is fatal to the whole Catch2
// process, so this one case takes the entire suite down with it and no later test runs.
// Tagged so the delegated dev loop (scripts/kernel-test.sh) can exclude it and still reach
// a green baseline; CI runs every test and keeps reporting it, so the bug stays visible.
TEST_CASE("entity constraints: tangent/midpoint/symmetric/angle", "[CadDocument][known-broken]")
{
using R = SketchPointRole;
using T = SketchConstraintType;
@@ -898,7 +903,10 @@ TEST_CASE("extrude taper + up-to-face distance", "[CadDocument]")
}
}
TEST_CASE("internal thread cuts a visible groove into the bore wall", "[CadDocument]")
// [known-broken]: pre-existing failure, the cut groove volume does not meet the asserted
// threshold. Excluded from the delegated dev loop so a green run means "I broke nothing";
// CI still runs and reports it.
TEST_CASE("internal thread cuts a visible groove into the bore wall", "[CadDocument][known-broken]")
{
using namespace Slic3r;
SketchPlane xy = SketchPlane::XY();