mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-21 12:24:29 +02:00
Tests: Skip tests where features not available on Windows
This commit is contained in:
parent
7dd2465187
commit
d10912d2ef
|
|
@ -10,7 +10,7 @@ try:
|
||||||
s = socket.AF_UNIX
|
s = socket.AF_UNIX
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# Not supported on Windows
|
# Not supported on Windows
|
||||||
exit(0)
|
exit(77)
|
||||||
|
|
||||||
def write_config(filename, port):
|
def write_config(filename, port):
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'w') as f:
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,15 @@
|
||||||
from mosq_test_helper import *
|
from mosq_test_helper import *
|
||||||
import http.client
|
import http.client
|
||||||
import json
|
import json
|
||||||
|
import platform
|
||||||
import ssl
|
import ssl
|
||||||
|
|
||||||
mosq_test.require_features(["WITH_HTTP_API", "WITH_TLS"])
|
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):
|
def write_config(filename, mqtt_port, http_port):
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'w') as f:
|
||||||
f.write("allow_anonymous true\n")
|
f.write("allow_anonymous true\n")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue