Tests: Skip tests where features not available on Windows

This commit is contained in:
Roger Light 2026-04-20 22:59:49 +01:00
parent 7dd2465187
commit d10912d2ef
2 changed files with 6 additions and 1 deletions

View file

@ -10,7 +10,7 @@ try:
s = socket.AF_UNIX
except AttributeError:
# Not supported on Windows
exit(0)
exit(77)
def write_config(filename, port):
with open(filename, 'w') as f:

View file

@ -3,10 +3,15 @@
from mosq_test_helper import *
import http.client
import json
import platform
import ssl
mosq_test.require_features(["WITH_HTTP_API", "WITH_TLS"])
if platform.system() == "Windows":
# gnutls not supported on Windows
exit(77)
def write_config(filename, mqtt_port, http_port):
with open(filename, 'w') as f:
f.write("allow_anonymous true\n")