]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - test.c
Slightly larger code, but strategic inline for corrector stuff. Makes it a little...
[xonotic/gmqcc.git] / test.c
diff --git a/test.c b/test.c
index c33b4ac38d8a80f0de156b9ff1d7620592154583..be823246c5b80d3d659575e1ae90e5cf58ba694c 100644 (file)
--- a/test.c
+++ b/test.c
@@ -1165,7 +1165,7 @@ void task_schedualize(size_t *pad) {
  *
  * It expects con_init() was called before hand.
  */
-bool test_perform(const char *curdir) {
+GMQCC_WARN bool test_perform(const char *curdir) {
     size_t pad[] = {
         0, 0
     };
@@ -1220,6 +1220,7 @@ static bool parsecmd(const char *optname, int *argc_, char ***argv_, char **out,
 }
 
 int main(int argc, char **argv) {
+    bool          succeed  = false;
     char         *redirout = (char*)stdout;
     char         *redirerr = (char*)stderr;
 
@@ -1242,11 +1243,11 @@ int main(int argc, char **argv) {
             con_change(redirout, redirerr);
 
             if (!strcmp(argv[0]+1, "debug")) {
-                OPTION_VALUE_BOOL(OPTION_DEBUG) = true;
+                OPTS_OPTION_BOOL(OPTION_DEBUG) = true;
                 continue;
             }
             if (!strcmp(argv[0]+1, "memchk")) {
-                OPTION_VALUE_BOOL(OPTION_MEMCHK) = true;
+                OPTS_OPTION_BOOL(OPTION_MEMCHK) = true;
                 continue;
             }
             if (!strcmp(argv[0]+1, "nocolor")) {
@@ -1259,7 +1260,9 @@ int main(int argc, char **argv) {
         }
     }
     con_change(redirout, redirerr);
-    test_perform("tests");
+    succeed = test_perform("tests");
     util_meminfo();
-    return 0;
+
+
+    return (succeed) ? EXIT_SUCCESS : EXIT_FAILURE;
 }