mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-21 12:24:29 +02:00
Use `ctest` or `make test` to run all tests. With this it's also possible to run tests on a Mac. Relative paths used in tests become absolute ones to make tests executable from any build folder. Also fixed race condition in test/broker/11-persistent-subscription-no-local.py Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
22 lines
529 B
Python
22 lines
529 B
Python
import inspect, os, sys
|
|
|
|
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
|
|
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
|
|
if cmd_subfolder not in sys.path:
|
|
sys.path.insert(0, cmd_subfolder)
|
|
|
|
import mosq_test
|
|
import mqtt5_props
|
|
|
|
import socket
|
|
import ssl
|
|
import struct
|
|
import subprocess
|
|
import time
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
source_dir = Path(__file__).resolve().parent
|
|
ssl_dir = source_dir.parent / "ssl"
|