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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015FPuYPS4T7QuEwjNu22rXD
This commit is contained in:
ispyisail
2026-10-04 00:24:20 +13:00
parent efd37538e0
commit 5db92384a5
+10
View File
@@ -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 <wiring_rules> 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"));