mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-21 07:13:46 +08:00
Experimental parallel testing for library.
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ test :
|
||||
$(MAKE) -C broker test
|
||||
$(MAKE) -C lib test
|
||||
|
||||
ptest : broker-test lib-test
|
||||
ptest :
|
||||
$(MAKE) -C broker ptest
|
||||
$(MAKE) -C lib ptest
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("01-con-discon-success", keepalive=keepalive)
|
||||
@@ -30,7 +32,7 @@ disconnect_packet = mosq_test.gen_disconnect()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -41,7 +43,8 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -20,6 +20,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 4
|
||||
connect_packet = mosq_test.gen_connect("01-keepalive-pingreq", keepalive=keepalive)
|
||||
@@ -31,7 +33,7 @@ pingresp_packet = mosq_test.gen_pingresp()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -42,7 +44,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -17,6 +17,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("01-no-clean-session", clean_session=False, keepalive=keepalive)
|
||||
@@ -24,7 +26,7 @@ connect_packet = mosq_test.gen_connect("01-no-clean-session", clean_session=Fals
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -35,7 +37,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -17,6 +17,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("01-unpwd-set", keepalive=keepalive, username="uname", password=";'[08gn=#")
|
||||
@@ -24,7 +26,7 @@ connect_packet = mosq_test.gen_connect("01-unpwd-set", keepalive=keepalive, user
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -35,7 +37,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -19,6 +19,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("01-will-set", keepalive=keepalive, will_topic="topic/on/unexpected/disconnect", will_qos=1, will_retain=True, will_payload="will message")
|
||||
@@ -26,7 +28,7 @@ connect_packet = mosq_test.gen_connect("01-will-set", keepalive=keepalive, will_
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -37,7 +39,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -19,6 +19,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("01-will-unpwd-set",
|
||||
@@ -28,7 +30,7 @@ connect_packet = mosq_test.gen_connect("01-will-unpwd-set",
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -39,7 +41,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -24,6 +24,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("subscribe-qos0-test", keepalive=keepalive)
|
||||
@@ -38,7 +40,7 @@ suback_packet = mosq_test.gen_suback(mid, 0)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -49,7 +51,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -24,6 +24,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("subscribe-qos1-test", keepalive=keepalive)
|
||||
@@ -38,7 +40,7 @@ suback_packet = mosq_test.gen_suback(mid, 1)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -49,7 +51,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -24,6 +24,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("subscribe-qos2-test", keepalive=keepalive)
|
||||
@@ -38,7 +40,7 @@ suback_packet = mosq_test.gen_suback(mid, 2)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -49,7 +51,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -14,6 +14,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("unsubscribe-test", keepalive=keepalive)
|
||||
@@ -28,7 +30,7 @@ unsuback_packet = mosq_test.gen_unsuback(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -39,7 +41,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -24,6 +24,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos1-test", keepalive=keepalive)
|
||||
@@ -38,7 +40,7 @@ puback_packet = mosq_test.gen_puback(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -49,7 +51,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -29,6 +29,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos2-test", keepalive=keepalive)
|
||||
@@ -45,7 +47,7 @@ pubcomp_packet = mosq_test.gen_pubcomp(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -56,7 +58,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -14,6 +14,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos1-test", keepalive=keepalive)
|
||||
@@ -29,7 +31,7 @@ puback_packet = mosq_test.gen_puback(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -41,7 +43,7 @@ except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -28,6 +28,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos1-test", keepalive=keepalive)
|
||||
@@ -43,7 +45,7 @@ puback_packet = mosq_test.gen_puback(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -54,7 +56,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -14,6 +14,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos2-test", keepalive=keepalive)
|
||||
@@ -31,7 +33,7 @@ pubcomp_packet = mosq_test.gen_pubcomp(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -42,7 +44,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -32,6 +32,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos2-test", keepalive=keepalive)
|
||||
@@ -49,7 +51,7 @@ pubcomp_packet = mosq_test.gen_pubcomp(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -60,7 +62,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -32,6 +32,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos2-test", keepalive=keepalive)
|
||||
@@ -49,7 +51,7 @@ pubcomp_packet = mosq_test.gen_pubcomp(mid)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -60,7 +62,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -22,6 +22,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos0-test-np", keepalive=keepalive)
|
||||
@@ -34,7 +36,7 @@ disconnect_packet = mosq_test.gen_disconnect()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -45,7 +47,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -22,6 +22,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
connect_packet = mosq_test.gen_connect("publish-qos0-test", keepalive=keepalive)
|
||||
@@ -34,7 +36,7 @@ disconnect_packet = mosq_test.gen_disconnect()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -45,7 +47,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -14,6 +14,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
mid = 16
|
||||
@@ -25,7 +27,7 @@ publish_packet = mosq_test.gen_publish("retain/qos0/test", qos=0, payload="retai
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.settimeout(10)
|
||||
sock.bind(('', 1888))
|
||||
sock.bind(('', port))
|
||||
sock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -36,7 +38,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = sock.accept()
|
||||
|
||||
@@ -23,6 +23,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
if sys.version < '2.7':
|
||||
print("WARNING: SSL not supported on Python 2.6")
|
||||
exit(0)
|
||||
@@ -39,7 +41,7 @@ ssock = ssl.wrap_socket(sock, ca_certs="../ssl/all-ca.crt",
|
||||
keyfile="../ssl/server.key", certfile="../ssl/server.crt",
|
||||
server_side=True, ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_REQUIRED)
|
||||
ssock.settimeout(10)
|
||||
ssock.bind(('', 1888))
|
||||
ssock.bind(('', port))
|
||||
ssock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -50,7 +52,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = ssock.accept()
|
||||
|
||||
@@ -23,6 +23,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
if sys.version < '2.7':
|
||||
print("WARNING: SSL not supported on Python 2.6")
|
||||
exit(0)
|
||||
@@ -39,7 +41,7 @@ ssock = ssl.wrap_socket(sock, ca_certs="../ssl/all-ca.crt",
|
||||
keyfile="../ssl/server.key", certfile="../ssl/server.crt",
|
||||
server_side=True, ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_REQUIRED)
|
||||
ssock.settimeout(10)
|
||||
ssock.bind(('', 1888))
|
||||
ssock.bind(('', port))
|
||||
ssock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -50,7 +52,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = ssock.accept()
|
||||
|
||||
@@ -22,6 +22,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
if sys.version < '2.7':
|
||||
print("WARNING: SSL not supported on Python 2.6")
|
||||
exit(0)
|
||||
@@ -36,7 +38,7 @@ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
ssock = ssl.wrap_socket(sock, ca_certs="../ssl/all-ca.crt", keyfile="../ssl/server.key", certfile="../ssl/server.crt", server_side=True, ssl_version=ssl.PROTOCOL_TLSv1)
|
||||
ssock.settimeout(10)
|
||||
ssock.bind(('', 1888))
|
||||
ssock.bind(('', port))
|
||||
ssock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -47,7 +49,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = ssock.accept()
|
||||
|
||||
@@ -14,6 +14,8 @@ if cmd_subfolder not in sys.path:
|
||||
|
||||
import mosq_test
|
||||
|
||||
port = mosq_test.get_lib_port()
|
||||
|
||||
if sys.version < '2.7':
|
||||
print("WARNING: SSL not supported on Python 2.6")
|
||||
exit(0)
|
||||
@@ -24,7 +26,7 @@ ssock = ssl.wrap_socket(sock, ca_certs="../ssl/all-ca.crt",
|
||||
keyfile="../ssl/server.key", certfile="../ssl/server.crt",
|
||||
server_side=True, ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_REQUIRED)
|
||||
ssock.settimeout(10)
|
||||
ssock.bind(('', 1888))
|
||||
ssock.bind(('', port))
|
||||
ssock.listen(5)
|
||||
|
||||
client_args = sys.argv[1:]
|
||||
@@ -35,7 +37,7 @@ try:
|
||||
except KeyError:
|
||||
pp = ''
|
||||
env['PYTHONPATH'] = '../../lib/python:'+pp
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env)
|
||||
client = mosq_test.start_client(filename=sys.argv[1].replace('/', '-'), cmd=client_args, env=env, port=port)
|
||||
|
||||
try:
|
||||
(conn, address) = ssock.accept()
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ LD_LIBRARY_PATH=../../lib
|
||||
|
||||
all :
|
||||
|
||||
ptest : c cpp
|
||||
ptest : test-compile
|
||||
./ptest.py
|
||||
|
||||
test : c cpp
|
||||
|
||||
|
||||
@@ -24,13 +24,15 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-con-discon-success", true, NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -17,12 +17,14 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-keepalive-pingreq", true, NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 4);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 4);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -10,11 +10,13 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-no-clean-session", false, NULL);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -10,12 +10,14 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-unpwd-set", true, NULL);
|
||||
mosquitto_username_pw_set(mosq, "uname", ";'[08gn=#");
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -10,12 +10,14 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-will-set", true, NULL);
|
||||
mosquitto_will_set(mosq, "topic/on/unexpected/disconnect", strlen("will message"), "will message", 1, true);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -10,13 +10,15 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("01-will-unpwd-set", true, NULL);
|
||||
mosquitto_username_pw_set(mosq, "oibvvwqw", "#'^2hg9a&nm38*us");
|
||||
mosquitto_will_set(mosq, "will-topic", strlen("will message"), "will message", 2, false);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -29,6 +29,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("subscribe-qos0-test", true, NULL);
|
||||
@@ -36,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
mosquitto_subscribe_callback_set(mosq, on_subscribe);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -29,6 +29,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("subscribe-qos1-test", true, NULL);
|
||||
@@ -36,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
mosquitto_subscribe_callback_set(mosq, on_subscribe);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -29,6 +29,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("subscribe-qos2-test", true, NULL);
|
||||
@@ -36,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
mosquitto_subscribe_callback_set(mosq, on_subscribe);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -29,6 +29,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("unsubscribe-test", true, NULL);
|
||||
@@ -36,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
mosquitto_unsubscribe_callback_set(mosq, on_unsubscribe);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -46,6 +46,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos1-test", true, NULL);
|
||||
@@ -53,7 +55,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_message_callback_set(mosq, on_message);
|
||||
mosquitto_message_retry_set(mosq, 3);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(1){
|
||||
mosquitto_loop(mosq, 300, 1);
|
||||
|
||||
@@ -48,6 +48,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos2-test", true, &run);
|
||||
@@ -55,7 +57,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_message_callback_set(mosq, on_message);
|
||||
mosquitto_message_retry_set(mosq, 5);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, 300, 1);
|
||||
|
||||
@@ -38,6 +38,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos1-test", true, NULL);
|
||||
@@ -46,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_publish_callback_set(mosq, on_publish);
|
||||
mosquitto_message_retry_set(mosq, 3);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, 300, 1);
|
||||
|
||||
@@ -38,6 +38,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos2-test", true, NULL);
|
||||
@@ -46,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_publish_callback_set(mosq, on_publish);
|
||||
mosquitto_message_retry_set(mosq, 3);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, 300, 1);
|
||||
|
||||
@@ -30,6 +30,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos2-test", true, NULL);
|
||||
@@ -37,7 +39,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
mosquitto_publish_callback_set(mosq, on_publish);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, 300, 1);
|
||||
|
||||
@@ -31,13 +31,15 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos0-test-np", true, NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_publish_callback_set(mosq, on_publish);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -31,13 +31,15 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("publish-qos0-test", true, NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_publish_callback_set(mosq, on_publish);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
rc = mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -20,12 +20,14 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("retain-qos0-test", true, NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -34,6 +34,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("08-ssl-connect-crt-auth-enc", true, NULL);
|
||||
@@ -42,7 +44,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -25,6 +25,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("08-ssl-connect-crt-auth", true, NULL);
|
||||
@@ -33,7 +35,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -25,6 +25,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("08-ssl-connect-no-auth", true, NULL);
|
||||
@@ -34,7 +36,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
mosquitto_disconnect_callback_set(mosq, on_disconnect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosquitto_loop(mosq, -1, 1);
|
||||
|
||||
@@ -16,6 +16,8 @@ int main(int argc, char *argv[])
|
||||
int rc;
|
||||
struct mosquitto *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosquitto_lib_init();
|
||||
|
||||
mosq = mosquitto_new("08-ssl-connect-crt-auth", true, NULL);
|
||||
@@ -23,7 +25,7 @@ int main(int argc, char *argv[])
|
||||
mosquitto_tls_set(mosq, "../ssl/test-fake-root-ca.crt", NULL, "../ssl/client.crt", "../ssl/client.key", NULL);
|
||||
mosquitto_connect_callback_set(mosq, on_connect);
|
||||
|
||||
rc = mosquitto_connect(mosq, "localhost", 1888, 60);
|
||||
rc = mosquitto_connect(mosq, "localhost", port, 60);
|
||||
|
||||
rc = mosquitto_loop_forever(mosq, -1, 1);
|
||||
if(rc == MOSQ_ERR_ERRNO && errno == EPROTO){
|
||||
|
||||
@@ -37,11 +37,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
struct mosquittopp_test *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosqpp::lib_init();
|
||||
|
||||
mosq = new mosquittopp_test("01-con-discon-success");
|
||||
|
||||
mosq->connect("localhost", 1888, 60);
|
||||
mosq->connect("localhost", port, 60);
|
||||
|
||||
while(run == -1){
|
||||
mosq->loop();
|
||||
|
||||
@@ -25,11 +25,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
struct mosquittopp_test *mosq;
|
||||
|
||||
int port = atoi(argv[1]);
|
||||
|
||||
mosqpp::lib_init();
|
||||
|
||||
mosq = new mosquittopp_test("01-keepalive-pingreq");
|
||||
|
||||
mosq->connect("localhost", 1888, 4);
|
||||
mosq->connect("localhost", port, 4);
|
||||
|
||||
while(run == -1){
|
||||
mosq->loop();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user