Experimental parallel testing for library.

This commit is contained in:
Roger A. Light
2018-04-16 10:02:22 +01:00
parent 5d2f5c25d7
commit ba71bc3b32
72 changed files with 355 additions and 95 deletions
+3 -1
View File
@@ -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();
+3 -1
View File
@@ -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();
+3 -1
View File
@@ -17,11 +17,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("01-no-clean-session", false);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -17,12 +17,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("01-unpwd-set");
mosq->username_pw_set("uname", ";'[08gn=#");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -20,12 +20,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("01-will-set");
mosq->will_set("topic/on/unexpected/disconnect", strlen("will message"), "will message", 1, true);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -17,13 +17,15 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("01-will-unpwd-set");
mosq->username_pw_set("oibvvwqw", "#'^2hg9a&nm38*us");
mosq->will_set("will-topic", strlen("will message"), "will message", 2, false);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -39,11 +39,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("subscribe-qos0-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -40,11 +40,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("subscribe-qos1-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -40,11 +40,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("subscribe-qos2-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -39,11 +39,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("unsubscribe-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -58,12 +58,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos1-test");
mosq->message_retry_set(3);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(1){
mosq->loop();
+3 -1
View File
@@ -60,12 +60,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos2-test");
mosq->message_retry_set(3);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
@@ -50,12 +50,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos1-test");
mosq->message_retry_set(3);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
@@ -50,12 +50,14 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos2-test");
mosq->message_retry_set(3);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -42,11 +42,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos2-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -40,11 +40,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos0-test-np");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -40,11 +40,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("publish-qos0-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -29,11 +29,13 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("retain-qos0-test");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
@@ -43,6 +43,8 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("08-ssl-connect-crt-auth-enc");
@@ -50,7 +52,7 @@ int main(int argc, char *argv[])
mosq->tls_opts_set(1, "tlsv1", NULL);
//mosq->tls_set("../ssl/test-ca.crt", NULL, "../ssl/client.crt", "../ssl/client.key");
mosq->tls_set("../ssl/all-ca.crt", NULL, "../ssl/client-encrypted.crt", "../ssl/client-encrypted.key", password_callback);
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -34,6 +34,8 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("08-ssl-connect-crt-auth");
@@ -41,7 +43,7 @@ int main(int argc, char *argv[])
mosq->tls_opts_set(1, "tlsv1", NULL);
//mosq->tls_set("../ssl/test-ca.crt", NULL, "../ssl/client.crt", "../ssl/client.key");
mosq->tls_set("../ssl/all-ca.crt", NULL, "../ssl/client.crt", "../ssl/client.key");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -34,6 +34,8 @@ int main(int argc, char *argv[])
{
struct mosquittopp_test *mosq;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("08-ssl-connect-no-auth");
@@ -41,7 +43,7 @@ int main(int argc, char *argv[])
mosq->tls_opts_set(1, "tlsv1", NULL);
//mosq->tls_set("../ssl/test-root-ca.crt");
mosq->tls_set("../ssl/all-ca.crt");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
while(run == -1){
mosq->loop();
+3 -1
View File
@@ -25,13 +25,15 @@ int main(int argc, char *argv[])
struct mosquittopp_test *mosq;
int rc;
int port = atoi(argv[1]);
mosqpp::lib_init();
mosq = new mosquittopp_test("08-ssl-fake-cacert");
mosq->tls_opts_set(1, "tlsv1", NULL);
mosq->tls_set("../ssl/test-fake-root-ca.crt", NULL, "../ssl/client.crt", "../ssl/client.key");
mosq->connect("localhost", 1888, 60);
mosq->connect("localhost", port, 60);
rc = mosq->loop_forever();
if(rc == MOSQ_ERR_ERRNO && errno == EPROTO){