]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix testsuite for when a process crashes (do not consider it a success)
authorDale Weiler <killfieldengine@gmail.com>
Mon, 26 Aug 2013 17:10:38 +0000 (13:10 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 26 Aug 2013 17:10:38 +0000 (13:10 -0400)
test.c

diff --git a/test.c b/test.c
index d4fd147a04575addbf9603e420e500aed07eb3cf..6c23dd7246008600b00001caecc146d790fd19dc 100644 (file)
--- a/test.c
+++ b/test.c
@@ -964,6 +964,7 @@ static void task_destroy(void) {
 static bool task_trymatch(size_t i, char ***line) {
     bool             success = true;
     bool             process = true;
+    int              retval  = EXIT_SUCCESS;
     FILE            *execute;
     char             buffer[4096];
     task_template_t *tmpl = task_tasks[i].tmpl;
@@ -1094,11 +1095,11 @@ static bool task_trymatch(size_t i, char ***line) {
     }
 
     if (process)
-        pclose(execute);
+        retval = pclose(execute);
     else
         fs_file_close(execute);
 
-    return success;
+    return success && retval == EXIT_SUCCESS;
 }
 
 static const char *task_type(task_template_t *tmpl) {