From 5db92384a5e8a4eef703d1e08f52cb2469fda8d8 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Sun, 4 Oct 2026 00:24:20 +1300 Subject: [PATCH] tst_wiringrules: skip the --run checks on a build without scripting The project's CI builds QElectroTech without scripting, where --run is not an option and the process never exits, so the test waited out its timeout and failed (#1272's stack, CI run 37118548599). The --run checks now skip there, as the script tests are left out of such builds; the rules and the save round trip still run. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015FPuYPS4T7QuEwjNu22rXD --- tests/qttest/tst_wiringrules.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/qttest/tst_wiringrules.cpp b/tests/qttest/tst_wiringrules.cpp index b53b6073e..f7f258d68 100644 --- a/tests/qttest/tst_wiringrules.cpp +++ b/tests/qttest/tst_wiringrules.cpp @@ -10,6 +10,15 @@ #include "wiringrules.h" + // The checks that drive QElectroTech through a script (--run) need a + // build with scripting; without it --run is not an option and the + // process never exits (QET_HAS_SCRIPTING, top-level CMakeLists.txt). +#ifdef QET_HAS_SCRIPTING +# define SKIP_WITHOUT_SCRIPTING +#else +# define SKIP_WITHOUT_SCRIPTING QSKIP("built without scripting: --run is not available") +#endif + // How many wires a terminal may take (discussion #1158). The rules are // tested on their own; the project setting and the refusal are tested // through the real binary: --resave keeps a element and @@ -243,6 +252,7 @@ private slots: void wirePastTheLimitIsRefused() { + SKIP_WITHOUT_SCRIPTING; // Without a rule the wire is drawn, as on master QCOMPARE(addWireToWiredTerminal(QFINDTESTDATA("fixtures/qet_bug_repro_resaved.qet"), false), QStringLiteral("true"));