From 9fe2640558b92eb851c77310bdd09f66d262f09c Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 11 Mar 2026 12:33:09 +0000 Subject: [PATCH] Test fixes for WITH_BROKER=OFF --- CMakeLists.txt | 2 +- test/apps/ctrl/ctrl-broker.py | 2 +- test/apps/ctrl/ctrl-dynsec.py | 2 +- test/apps/db_dump/db-dump-stats-current.py | 2 +- test/apps/passwd/passwd-changes.py | 2 +- test/client/02-subscribe-env.py | 2 ++ test/client/02-subscribe-filter-out.py | 2 ++ test/client/02-subscribe-format-json-properties.py | 2 ++ test/client/02-subscribe-format-json-qos0.py | 2 ++ test/client/02-subscribe-format-json-qos1.py | 2 ++ test/client/02-subscribe-format-json-retain.py | 2 ++ test/client/02-subscribe-format.py | 2 ++ test/client/02-subscribe-null.py | 2 ++ test/client/02-subscribe-qos1.py | 2 ++ test/client/02-subscribe-verbose.py | 2 ++ test/client/03-publish-env.py | 2 ++ test/client/03-publish-file-empty.py | 2 ++ test/client/03-publish-file.py | 2 ++ test/client/03-publish-options-file.py | 2 ++ test/client/03-publish-qos0-empty.py | 2 ++ test/client/03-publish-qos1-properties.py | 2 ++ test/client/03-publish-qos1.py | 2 ++ test/client/03-publish-repeat.py | 2 ++ test/client/03-publish-socks-auth-failed.py | 2 +- test/client/03-publish-socks-no-auth.py | 2 +- test/client/03-publish-socks.py | 2 +- test/client/03-publish-stdin-file.py | 2 ++ test/client/03-publish-stdin-line.py | 2 +- test/client/03-publish-url.py | 2 ++ test/client/04-rr-env.py | 2 ++ test/client/04-rr-qos1.py | 2 ++ 31 files changed, 53 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c204f134..237a8b0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,7 +185,7 @@ if(WITH_APPS) add_subdirectory(apps) endif() -if(WITH_PLUGINS) +if(WITH_BROKER AND WITH_PLUGINS) add_subdirectory(plugins) endif() diff --git a/test/apps/ctrl/ctrl-broker.py b/test/apps/ctrl/ctrl-broker.py index db4cb28f..5021bd56 100755 --- a/test/apps/ctrl/ctrl-broker.py +++ b/test/apps/ctrl/ctrl-broker.py @@ -6,7 +6,7 @@ from mosq_test_helper import * import json import shutil -mosq_test.require_features(["WITH_CONTROL", "WITH_PLUGINS", "WITH_PLUGIN_DYNAMIC_SECURITY", "WITH_TLS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_CONTROL", "WITH_PLUGINS", "WITH_PLUGIN_DYNAMIC_SECURITY", "WITH_TLS"]) def write_config(filename, ports): with open(filename, 'w') as f: diff --git a/test/apps/ctrl/ctrl-dynsec.py b/test/apps/ctrl/ctrl-dynsec.py index bb90d8af..54acf5cf 100755 --- a/test/apps/ctrl/ctrl-dynsec.py +++ b/test/apps/ctrl/ctrl-dynsec.py @@ -5,7 +5,7 @@ import json import os import shutil -mosq_test.require_features(["WITH_CONTROL", "WITH_PLUGINS", "WITH_PLUGIN_DYNAMIC_SECURITY", "WITH_TLS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_CONTROL", "WITH_PLUGINS", "WITH_PLUGIN_DYNAMIC_SECURITY", "WITH_TLS"]) def write_config(filename, ports): with open(filename, 'w') as f: diff --git a/test/apps/db_dump/db-dump-stats-current.py b/test/apps/db_dump/db-dump-stats-current.py index 453f5ccd..5cdfef6d 100755 --- a/test/apps/db_dump/db-dump-stats-current.py +++ b/test/apps/db_dump/db-dump-stats-current.py @@ -5,7 +5,7 @@ from mosq_test_helper import * import shutil -mosq_test.require_features(["WITH_CLIENTS", "WITH_PERSISTENCE"]) +mosq_test.require_features(["WITH_BROKER", "WITH_CLIENTS", "WITH_PERSISTENCE"]) def write_config(conf_file, port): with open(conf_file, 'w') as f: diff --git a/test/apps/passwd/passwd-changes.py b/test/apps/passwd/passwd-changes.py index 6db2f82b..fe4d853d 100755 --- a/test/apps/passwd/passwd-changes.py +++ b/test/apps/passwd/passwd-changes.py @@ -5,7 +5,7 @@ import json import shutil import signal -mosq_test.require_features(["WITH_TLS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_TLS"]) def write_config(filename, pw_file, port): with open(filename, 'w') as f: diff --git a/test/client/02-subscribe-env.py b/test/client/02-subscribe-env.py index d47804e5..8f3383cc 100755 --- a/test/client/02-subscribe-env.py +++ b/test/client/02-subscribe-env.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver, env): rc = 1 diff --git a/test/client/02-subscribe-filter-out.py b/test/client/02-subscribe-filter-out.py index 16f2e7a3..a943ae78 100755 --- a/test/client/02-subscribe-filter-out.py +++ b/test/client/02-subscribe-filter-out.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-format-json-properties.py b/test/client/02-subscribe-format-json-properties.py index 3daea9ec..47e23729 100755 --- a/test/client/02-subscribe-format-json-properties.py +++ b/test/client/02-subscribe-format-json-properties.py @@ -5,6 +5,8 @@ from mosq_test_helper import * import json +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-format-json-qos0.py b/test/client/02-subscribe-format-json-qos0.py index 71813d34..a72453fe 100755 --- a/test/client/02-subscribe-format-json-qos0.py +++ b/test/client/02-subscribe-format-json-qos0.py @@ -5,6 +5,8 @@ from mosq_test_helper import * import json +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-format-json-qos1.py b/test/client/02-subscribe-format-json-qos1.py index 528e765a..81cfed36 100755 --- a/test/client/02-subscribe-format-json-qos1.py +++ b/test/client/02-subscribe-format-json-qos1.py @@ -5,6 +5,8 @@ from mosq_test_helper import * import json +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-format-json-retain.py b/test/client/02-subscribe-format-json-retain.py index 51d047f5..6f9571ee 100755 --- a/test/client/02-subscribe-format-json-retain.py +++ b/test/client/02-subscribe-format-json-retain.py @@ -5,6 +5,8 @@ from mosq_test_helper import * import json +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-format.py b/test/client/02-subscribe-format.py index 9b3884c2..6832df1d 100755 --- a/test/client/02-subscribe-format.py +++ b/test/client/02-subscribe-format.py @@ -5,6 +5,8 @@ from mosq_test_helper import * import platform +mosq_test.require_features(["WITH_BROKER"]) + def do_test(format_str, expected_output, proto_ver=4, payload="message"): rc = 1 diff --git a/test/client/02-subscribe-null.py b/test/client/02-subscribe-null.py index 03f84230..8e1b575c 100755 --- a/test/client/02-subscribe-null.py +++ b/test/client/02-subscribe-null.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-qos1.py b/test/client/02-subscribe-qos1.py index a4801400..5e427ec2 100755 --- a/test/client/02-subscribe-qos1.py +++ b/test/client/02-subscribe-qos1.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/02-subscribe-verbose.py b/test/client/02-subscribe-verbose.py index 13d19ef1..a8fd24cc 100755 --- a/test/client/02-subscribe-verbose.py +++ b/test/client/02-subscribe-verbose.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-env.py b/test/client/03-publish-env.py index 6e40bf7b..0d8a9f1a 100755 --- a/test/client/03-publish-env.py +++ b/test/client/03-publish-env.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver, env): rc = 1 diff --git a/test/client/03-publish-file-empty.py b/test/client/03-publish-file-empty.py index 7714ee6c..d7972b9c 100755 --- a/test/client/03-publish-file-empty.py +++ b/test/client/03-publish-file-empty.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def write_file(filename): with open(filename, 'w') as f: pass diff --git a/test/client/03-publish-file.py b/test/client/03-publish-file.py index ccde2320..8c91fe24 100755 --- a/test/client/03-publish-file.py +++ b/test/client/03-publish-file.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def write_file(filename): with open(filename, 'w') as f: f.write("line1\n") diff --git a/test/client/03-publish-options-file.py b/test/client/03-publish-options-file.py index 70da3bf3..7d06d30a 100755 --- a/test/client/03-publish-options-file.py +++ b/test/client/03-publish-options-file.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def write_config(filename, port, V): with open(filename, 'w') as f: f.write("-p %d\n" % (port)) diff --git a/test/client/03-publish-qos0-empty.py b/test/client/03-publish-qos0-empty.py index 4e6323e4..aefdf2ad 100755 --- a/test/client/03-publish-qos0-empty.py +++ b/test/client/03-publish-qos0-empty.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-qos1-properties.py b/test/client/03-publish-qos1-properties.py index e234efb1..2b643904 100755 --- a/test/client/03-publish-qos1-properties.py +++ b/test/client/03-publish-qos1-properties.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-qos1.py b/test/client/03-publish-qos1.py index dd12ae60..a31abac8 100755 --- a/test/client/03-publish-qos1.py +++ b/test/client/03-publish-qos1.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-repeat.py b/test/client/03-publish-repeat.py index 6846f726..51b320f5 100755 --- a/test/client/03-publish-repeat.py +++ b/test/client/03-publish-repeat.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-socks-auth-failed.py b/test/client/03-publish-socks-auth-failed.py index 32f6e515..a5257423 100755 --- a/test/client/03-publish-socks-auth-failed.py +++ b/test/client/03-publish-socks-auth-failed.py @@ -4,7 +4,7 @@ from mosq_test_helper import * -mosq_test.require_features(["WITH_SOCKS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_SOCKS"]) def do_test(proto_ver, host): rc = 1 diff --git a/test/client/03-publish-socks-no-auth.py b/test/client/03-publish-socks-no-auth.py index b1f0c3ed..3e330400 100755 --- a/test/client/03-publish-socks-no-auth.py +++ b/test/client/03-publish-socks-no-auth.py @@ -4,7 +4,7 @@ from mosq_test_helper import * -mosq_test.require_features(["WITH_SOCKS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_SOCKS"]) def do_test(proto_ver, host): rc = 1 diff --git a/test/client/03-publish-socks.py b/test/client/03-publish-socks.py index 6671100d..4a15df3b 100755 --- a/test/client/03-publish-socks.py +++ b/test/client/03-publish-socks.py @@ -4,7 +4,7 @@ from mosq_test_helper import * -mosq_test.require_features(["WITH_SOCKS"]) +mosq_test.require_features(["WITH_BROKER", "WITH_SOCKS"]) def do_test(proto_ver, host): rc = 1 diff --git a/test/client/03-publish-stdin-file.py b/test/client/03-publish-stdin-file.py index a18fcd44..218059f0 100755 --- a/test/client/03-publish-stdin-file.py +++ b/test/client/03-publish-stdin-file.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-stdin-line.py b/test/client/03-publish-stdin-line.py index 9d9377a7..0b2087d2 100755 --- a/test/client/03-publish-stdin-line.py +++ b/test/client/03-publish-stdin-line.py @@ -4,7 +4,7 @@ from mosq_test_helper import * -mosq_test.require_features(["WITH_THREADING"]) +mosq_test.require_features(["WITH_BROKER", "WITH_THREADING"]) def do_test(proto_ver): rc = 1 diff --git a/test/client/03-publish-url.py b/test/client/03-publish-url.py index ae1f7da6..20dffbec 100755 --- a/test/client/03-publish-url.py +++ b/test/client/03-publish-url.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1 diff --git a/test/client/04-rr-env.py b/test/client/04-rr-env.py index 04973d4d..e2b852c0 100755 --- a/test/client/04-rr-env.py +++ b/test/client/04-rr-env.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver, env): rc = 1 diff --git a/test/client/04-rr-qos1.py b/test/client/04-rr-qos1.py index 1dfbc7cb..577e3100 100755 --- a/test/client/04-rr-qos1.py +++ b/test/client/04-rr-qos1.py @@ -4,6 +4,8 @@ from mosq_test_helper import * +mosq_test.require_features(["WITH_BROKER"]) + def do_test(proto_ver): rc = 1