]> jfr.im git - irc/rizon/plexus4.git/commitdiff
Check that IRCd cleanly returned before starting the join test.
authorDarius Jahandarie <redacted>
Sat, 13 Feb 2016 18:25:30 +0000 (13:25 -0500)
committerDarius Jahandarie <redacted>
Tue, 15 Nov 2016 17:49:54 +0000 (12:49 -0500)
test/plexus_runner.c
test/plexus_test.h
test/tests/join.c

index 4066c83fd8e43386ac6b7a67b2e9e9b34404d2e6..23c2d07d04ba58e0136ed6410a14ee8cf85b6842 100644 (file)
 
 extern int plexus_main(int, char*[]);
 
-void
+int
 plexus_up(void)
 {
-  plexus_up_conf(RESOURCEDIR "/test.conf");
+  return plexus_up_conf(RESOURCEDIR "/test.conf");
 }
 
-void
+int
 plexus_up_conf(const char *configfile)
 {
   char pidfile[PATH_MAX];
@@ -47,7 +47,7 @@ plexus_up_conf(const char *configfile)
     NULL /* C standard requires argv[argc] == NULL */
   };
 
-  plexus_main(sizeof(args) / sizeof(*args) - 1, args);
+  return plexus_main(sizeof(args) / sizeof(*args) - 1, args);
 }
 
 void
index 20cf0829de7ca5cf09fb7ff11177f8899451d997..3f695891074b21d0e0fadb327f9a90576cdfe401 100644 (file)
@@ -30,8 +30,8 @@ struct PlexusClient
   struct dbuf_queue buf_recvq;
 };
 
-extern void plexus_up(void);
-extern void plexus_up_conf(const char *);
+extern int plexus_up(void);
+extern int plexus_up_conf(const char *);
 extern void plexus_down(void);
 
 extern void io_write(struct PlexusClient *client, const char *buf, ...);
index 3fe90f11c4f24af1f97c9df616be8d30e88c19cf..b1572838adbf7c08c72dd292e718252141d23f65 100644 (file)
@@ -80,7 +80,8 @@ send_invite(struct PlexusClient *c1, struct PlexusClient *c2, struct Channel *ch
 
 START_TEST(join)
 {
-  plexus_up();
+  int err = plexus_up();
+  ck_assert(err == 0);
 
   struct PlexusClient *client1 = client_register("test1"),
                       *client2 = client_register("test2");