]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - test.c
propagate the 'inexact' flag on when initializing a constant
[xonotic/gmqcc.git] / test.c
diff --git a/test.c b/test.c
index c415fb87b72dba8f076cbea8a63e043fd39837f0..29f4b1100fb1ea0df4b0bbea4f2eaef206207460 100644 (file)
--- a/test.c
+++ b/test.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013
+ * Copyright (C) 2012, 2013, 2014
  *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -163,8 +163,8 @@ static int task_pclose(fs_file_t **handles) {
         char    *cmd  = NULL;
         popen_t *open = (popen_t*)mem_a(sizeof(popen_t));
 
-        util_tmpnam(open->name_err);
-        util_tmpnam(open->name_out);
+        tmpnam(open->name_err);
+        tmpnam(open->name_out);
 
         (void)mode; /* excluded */
 
@@ -1100,6 +1100,7 @@ static size_t task_schedualize(size_t *pad) {
     size_t i        = 0;
     size_t j        = 0;
     size_t failed   = 0;
+    int    status   = 0;
 
     util_snprintf(space[0], sizeof(space[0]), "%d", (int)vec_size(task_tasks));
 
@@ -1167,7 +1168,9 @@ static size_t task_schedualize(size_t *pad) {
             continue;
         }
 
-        if (task_pclose(task_tasks[i].runhandles) != EXIT_SUCCESS && strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {
+        status = task_pclose(task_tasks[i].runhandles);
+        if ((!strcmp(task_tasks[i].tmpl->proceduretype, "-fail") && status == EXIT_SUCCESS)
+        ||  ( strcmp(task_tasks[i].tmpl->proceduretype, "-fail") && status == EXIT_FAILURE)) {
             con_out("failure:   `%s` %*s %*s\n",
                 task_tasks[i].tmpl->description,
                 (pad[0] + pad[1] - strlen(task_tasks[i].tmpl->description)) + (strlen(task_tasks[i].tmpl->rulesfile) - pad[1]),