From 4a7da066e0c81a2daacb5fbe99805151d95a3b26 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 1 Jun 2023 22:36:11 +0100 Subject: [PATCH] Use mosq_test.get_build_root() --- test/broker/14-dynsec-config-init-env.py | 2 +- test/broker/14-dynsec-config-init-file.py | 2 +- test/broker/14-dynsec-config-init-random.py | 2 +- test/broker/persist_sqlite.py | 3 ++- test/client/02-subscribe-argv-errors-tls-psk.py | 2 +- test/client/02-subscribe-argv-errors-tls.py | 2 +- test/client/02-subscribe-argv-errors-without-tls.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-ws.py | 2 +- test/client/02-subscribe-qos1.py | 2 +- test/client/02-subscribe-verbose.py | 2 +- test/client/03-publish-argv-errors-tls-psk.py | 2 +- test/client/03-publish-argv-errors-tls.py | 2 +- test/client/03-publish-argv-errors-without-tls.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-ws-large.py | 2 +- test/client/03-publish-qos1-ws.py | 2 +- test/client/03-publish-qos1.py | 2 +- test/client/03-publish-repeat.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-argv-errors-tls-psk.py | 2 +- test/client/04-rr-argv-errors-tls.py | 2 +- test/client/04-rr-argv-errors-without-tls.py | 2 +- test/client/04-rr-qos1-ws.py | 2 +- test/client/04-rr-qos1.py | 2 +- test/random/test.py | 2 +- 39 files changed, 40 insertions(+), 39 deletions(-) diff --git a/test/broker/14-dynsec-config-init-env.py b/test/broker/14-dynsec-config-init-env.py index a23b8029..474b185c 100755 --- a/test/broker/14-dynsec-config-init-env.py +++ b/test/broker/14-dynsec-config-init-env.py @@ -8,7 +8,7 @@ def write_config(filename, port): with open(filename, 'w') as f: f.write("listener %d\n" % (port)) f.write("allow_anonymous false\n") - f.write("plugin ../../plugins/dynamic-security/mosquitto_dynamic_security.so\n") + f.write(f"plugin {mosq_test.get_build_root()}/plugins/dynamic-security/mosquitto_dynamic_security.so\n") f.write("plugin_opt_config_file %d/dynamic-security.json\n" % (port)) diff --git a/test/broker/14-dynsec-config-init-file.py b/test/broker/14-dynsec-config-init-file.py index aca6a084..5bd8e56c 100755 --- a/test/broker/14-dynsec-config-init-file.py +++ b/test/broker/14-dynsec-config-init-file.py @@ -8,7 +8,7 @@ def write_config(filename, port): with open(filename, 'w') as f: f.write("listener %d\n" % (port)) f.write("allow_anonymous false\n") - f.write("plugin ../../plugins/dynamic-security/mosquitto_dynamic_security.so\n") + f.write(f"plugin {mosq_test.get_build_root()}/plugins/dynamic-security/mosquitto_dynamic_security.so\n") f.write("plugin_opt_config_file %d/dynamic-security.json\n" % (port)) f.write("plugin_opt_password_init_file %d/init\n" % (port)) diff --git a/test/broker/14-dynsec-config-init-random.py b/test/broker/14-dynsec-config-init-random.py index 20e7116a..7e7a6dde 100755 --- a/test/broker/14-dynsec-config-init-random.py +++ b/test/broker/14-dynsec-config-init-random.py @@ -8,7 +8,7 @@ def write_config(filename, port): with open(filename, 'w') as f: f.write("listener %d\n" % (port)) f.write("allow_anonymous false\n") - f.write("plugin ../../plugins/dynamic-security/mosquitto_dynamic_security.so\n") + f.write(f"plugin {mosq_test.get_build_root()}/plugins/dynamic-security/mosquitto_dynamic_security.so\n") f.write("plugin_opt_config_file %d/dynamic-security.json\n" % (port)) diff --git a/test/broker/persist_sqlite.py b/test/broker/persist_sqlite.py index 2b4d5777..88e29b60 100755 --- a/test/broker/persist_sqlite.py +++ b/test/broker/persist_sqlite.py @@ -1,6 +1,7 @@ import os from pathlib import Path import sqlite3 +import mosq_test dir_in = 0 dir_out = 1 @@ -22,7 +23,7 @@ def write_config(filename, port): with open(filename, 'w') as f: f.write("listener %d\n" % (port)) f.write("allow_anonymous true\n") - f.write("plugin ../../plugins/persist-sqlite/mosquitto_persist_sqlite.so\n") + f.write(f"plugin {mosq_test.get_build_root()}/plugins/persist-sqlite/mosquitto_persist_sqlite.so\n") f.write("plugin_opt_db_file %d/mosquitto.sqlite3\n" % (port)) diff --git a/test/client/02-subscribe-argv-errors-tls-psk.py b/test/client/02-subscribe-argv-errors-tls-psk.py index a5d1defb..b6b50659 100755 --- a/test/client/02-subscribe-argv-errors-tls-psk.py +++ b/test/client/02-subscribe-argv-errors-tls-psk.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(sub): diff --git a/test/client/02-subscribe-argv-errors-tls.py b/test/client/02-subscribe-argv-errors-tls.py index 14eb2b89..2272b345 100755 --- a/test/client/02-subscribe-argv-errors-tls.py +++ b/test/client/02-subscribe-argv-errors-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(sub): diff --git a/test/client/02-subscribe-argv-errors-without-tls.py b/test/client/02-subscribe-argv-errors-without-tls.py index 413e7e9b..54247cd3 100755 --- a/test/client/02-subscribe-argv-errors-without-tls.py +++ b/test/client/02-subscribe-argv-errors-without-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(sub): diff --git a/test/client/02-subscribe-filter-out.py b/test/client/02-subscribe-filter-out.py index 9c8abc4c..16f2e7a3 100755 --- a/test/client/02-subscribe-filter-out.py +++ b/test/client/02-subscribe-filter-out.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '0', '-t', '02/sub/filter-out/#', diff --git a/test/client/02-subscribe-format-json-properties.py b/test/client/02-subscribe-format-json-properties.py index 934821dc..40f6b12a 100755 --- a/test/client/02-subscribe-format-json-properties.py +++ b/test/client/02-subscribe-format-json-properties.py @@ -21,7 +21,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-F', '%j', diff --git a/test/client/02-subscribe-format-json-qos0.py b/test/client/02-subscribe-format-json-qos0.py index fafa8977..71813d34 100755 --- a/test/client/02-subscribe-format-json-qos0.py +++ b/test/client/02-subscribe-format-json-qos0.py @@ -21,7 +21,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-F', '%j', '-t', '02/sub/format/json/test', diff --git a/test/client/02-subscribe-format-json-qos1.py b/test/client/02-subscribe-format-json-qos1.py index a486ed86..528e765a 100755 --- a/test/client/02-subscribe-format-json-qos1.py +++ b/test/client/02-subscribe-format-json-qos1.py @@ -21,7 +21,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-F', '%j', diff --git a/test/client/02-subscribe-format-json-retain.py b/test/client/02-subscribe-format-json-retain.py index 4043a7fa..51d047f5 100755 --- a/test/client/02-subscribe-format-json-retain.py +++ b/test/client/02-subscribe-format-json-retain.py @@ -21,7 +21,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-F', '%j', '-t', '02/sub/format/json/retain/test', diff --git a/test/client/02-subscribe-format.py b/test/client/02-subscribe-format.py index 62628cae..417219e7 100755 --- a/test/client/02-subscribe-format.py +++ b/test/client/02-subscribe-format.py @@ -20,7 +20,7 @@ def do_test(format_str, expected_output, proto_ver=4, payload="message"): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-t', '02/sub/format/test', diff --git a/test/client/02-subscribe-null.py b/test/client/02-subscribe-null.py index 8afabeed..03f84230 100755 --- a/test/client/02-subscribe-null.py +++ b/test/client/02-subscribe-null.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-t', '02/sub/null/test', diff --git a/test/client/02-subscribe-qos1-ws.py b/test/client/02-subscribe-qos1-ws.py index 489abda7..efcb0898 100755 --- a/test/client/02-subscribe-qos1-ws.py +++ b/test/client/02-subscribe-qos1-ws.py @@ -28,7 +28,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(ports[0]), '-q', '1', '-t', '02/sub/qos1/test', diff --git a/test/client/02-subscribe-qos1.py b/test/client/02-subscribe-qos1.py index 7831303b..a4801400 100755 --- a/test/client/02-subscribe-qos1.py +++ b/test/client/02-subscribe-qos1.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-t', '02/sub/qos1/test', diff --git a/test/client/02-subscribe-verbose.py b/test/client/02-subscribe-verbose.py index 76b2d968..13d19ef1 100755 --- a/test/client/02-subscribe-verbose.py +++ b/test/client/02-subscribe-verbose.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_sub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_sub', '-p', str(port), '-q', '1', '-t', '02/sub/verbose/test', diff --git a/test/client/03-publish-argv-errors-tls-psk.py b/test/client/03-publish-argv-errors-tls-psk.py index 6129bdf7..d67aeccb 100755 --- a/test/client/03-publish-argv-errors-tls-psk.py +++ b/test/client/03-publish-argv-errors-tls-psk.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub'] + args pub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(pub): diff --git a/test/client/03-publish-argv-errors-tls.py b/test/client/03-publish-argv-errors-tls.py index 967149e0..8304217f 100755 --- a/test/client/03-publish-argv-errors-tls.py +++ b/test/client/03-publish-argv-errors-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub'] + args pub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(pub): diff --git a/test/client/03-publish-argv-errors-without-tls.py b/test/client/03-publish-argv-errors-without-tls.py index 8cc92d08..5a1dac55 100755 --- a/test/client/03-publish-argv-errors-without-tls.py +++ b/test/client/03-publish-argv-errors-without-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub'] + args pub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) if mosq_test.wait_for_subprocess(pub): diff --git a/test/client/03-publish-file-empty.py b/test/client/03-publish-file-empty.py index 42792198..7714ee6c 100755 --- a/test/client/03-publish-file-empty.py +++ b/test/client/03-publish-file-empty.py @@ -26,7 +26,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/file/empty/test', diff --git a/test/client/03-publish-file.py b/test/client/03-publish-file.py index 0dd6f7bf..ccde2320 100755 --- a/test/client/03-publish-file.py +++ b/test/client/03-publish-file.py @@ -28,7 +28,7 @@ def do_test(proto_ver): } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/file/test', diff --git a/test/client/03-publish-options-file.py b/test/client/03-publish-options-file.py index b860b4ca..b9818f59 100755 --- a/test/client/03-publish-options-file.py +++ b/test/client/03-publish-options-file.py @@ -29,7 +29,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-o', conf_file ] diff --git a/test/client/03-publish-qos0-empty.py b/test/client/03-publish-qos0-empty.py index bee7f4d8..15c09663 100755 --- a/test/client/03-publish-qos0-empty.py +++ b/test/client/03-publish-qos0-empty.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '0', '-t', '03/pub/qos0/test', diff --git a/test/client/03-publish-qos1-properties.py b/test/client/03-publish-qos1-properties.py index 53482ca6..eb09911d 100755 --- a/test/client/03-publish-qos1-properties.py +++ b/test/client/03-publish-qos1-properties.py @@ -20,7 +20,7 @@ def do_test(proto_ver): else: V = 'mqttv31' - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/qos1/test/properties', diff --git a/test/client/03-publish-qos1-ws-large.py b/test/client/03-publish-qos1-ws-large.py index 00b7d37d..2572c741 100755 --- a/test/client/03-publish-qos1-ws-large.py +++ b/test/client/03-publish-qos1-ws-large.py @@ -31,7 +31,7 @@ def do_test(proto_ver): payload = "abcdefghijklmnopqrstuvwxyz0123456789"*1821 - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(ports[0]), '-q', '1', '-t', '03/pub/qos1/test', diff --git a/test/client/03-publish-qos1-ws.py b/test/client/03-publish-qos1-ws.py index 21941057..1017d9b2 100755 --- a/test/client/03-publish-qos1-ws.py +++ b/test/client/03-publish-qos1-ws.py @@ -28,7 +28,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(ports[0]), '-q', '1', '-t', '03/pub/qos1/test', diff --git a/test/client/03-publish-qos1.py b/test/client/03-publish-qos1.py index d850fa16..b2a543aa 100755 --- a/test/client/03-publish-qos1.py +++ b/test/client/03-publish-qos1.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/qos1/test', diff --git a/test/client/03-publish-repeat.py b/test/client/03-publish-repeat.py index ead50e98..6846f726 100755 --- a/test/client/03-publish-repeat.py +++ b/test/client/03-publish-repeat.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/repeat/test', diff --git a/test/client/03-publish-socks.py b/test/client/03-publish-socks.py index 15157732..449485c5 100755 --- a/test/client/03-publish-socks.py +++ b/test/client/03-publish-socks.py @@ -40,7 +40,7 @@ def do_test(proto_ver, host): } env = mosq_test.env_add_ld_library_path(env) cmd = [ - '../../client/mosquitto_pub', + f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-h', host, '-p', str(port2), '-q', '1', diff --git a/test/client/03-publish-stdin-file.py b/test/client/03-publish-stdin-file.py index a30d160f..a18fcd44 100755 --- a/test/client/03-publish-stdin-file.py +++ b/test/client/03-publish-stdin-file.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '1', '-t', '03/pub/stdin/file/test', diff --git a/test/client/03-publish-stdin-line.py b/test/client/03-publish-stdin-line.py index b0457a7a..9f4037e3 100755 --- a/test/client/03-publish-stdin-line.py +++ b/test/client/03-publish-stdin-line.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-p', str(port), '-q', '2', '-t', '03/pub/stdin/line/test', diff --git a/test/client/03-publish-url.py b/test/client/03-publish-url.py index 577b239c..ae1f7da6 100755 --- a/test/client/03-publish-url.py +++ b/test/client/03-publish-url.py @@ -20,7 +20,7 @@ def do_test(proto_ver): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_pub', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_pub', '-L', f'mqtt://localhost:{port}/03/pub/url/test', '-m', 'message', '-V', V diff --git a/test/client/04-rr-argv-errors-tls-psk.py b/test/client/04-rr-argv-errors-tls-psk.py index 14629c51..7d1d7657 100755 --- a/test/client/04-rr-argv-errors-tls-psk.py +++ b/test/client/04-rr-argv-errors-tls-psk.py @@ -14,7 +14,7 @@ def do_test(args, stderr_expected, rc_expected): } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_rr'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_rr'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) sub.wait() diff --git a/test/client/04-rr-argv-errors-tls.py b/test/client/04-rr-argv-errors-tls.py index 005b1d7d..5766dbb6 100755 --- a/test/client/04-rr-argv-errors-tls.py +++ b/test/client/04-rr-argv-errors-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_rr'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_rr'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) sub.wait() diff --git a/test/client/04-rr-argv-errors-without-tls.py b/test/client/04-rr-argv-errors-without-tls.py index 9eeb1ed7..2f47d5cf 100755 --- a/test/client/04-rr-argv-errors-without-tls.py +++ b/test/client/04-rr-argv-errors-without-tls.py @@ -13,7 +13,7 @@ def do_test(args, stderr_expected, rc_expected): 'XDG_CONFIG_HOME':'/tmp/missing' } env = mosq_test.env_add_ld_library_path(env) - cmd = ['../../client/mosquitto_rr'] + args + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_rr'] + args sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) sub.wait() diff --git a/test/client/04-rr-qos1-ws.py b/test/client/04-rr-qos1-ws.py index 3a9ac793..d8c5f034 100755 --- a/test/client/04-rr-qos1-ws.py +++ b/test/client/04-rr-qos1-ws.py @@ -29,7 +29,7 @@ def do_test(proto_ver): } env = mosq_test.env_add_ld_library_path(env) payload = "message" - cmd = ['../../client/mosquitto_rr', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_rr', '-p', str(ports[0]), '-q', '1', '-t', '04/rr/qos1/test/request', diff --git a/test/client/04-rr-qos1.py b/test/client/04-rr-qos1.py index 9de5286a..f44b41d6 100755 --- a/test/client/04-rr-qos1.py +++ b/test/client/04-rr-qos1.py @@ -21,7 +21,7 @@ def do_test(proto_ver): } env = mosq_test.env_add_ld_library_path(env) payload = "message" - cmd = ['../../client/mosquitto_rr', + cmd = [f'{mosq_test.get_build_root()}/client/mosquitto_rr', '-p', str(port), '-q', '1', '-t', '04/rr/qos1/test/request', diff --git a/test/random/test.py b/test/random/test.py index 373c4593..894f7e97 100755 --- a/test/random/test.py +++ b/test/random/test.py @@ -40,5 +40,5 @@ def run_clients(max_clients): env = mosq_test.env_add_ld_library_path() -#broker = subprocess.Popen(["../../src/mosquitto", "-c", "random.conf"], env=env) +#broker = subprocess.Popen([mosq_test.get_build_root()+"/src/mosquitto", "-c", "random.conf"], env=env) run_clients(1000)