aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-06 18:53:29 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-06 18:55:16 +0100
commit9fe364a15ae01b30d26f5f90b67f01192c427595 (patch)
treee417c1e595731e23964100019504288f36819a4b
parentb711a7d3487a82526d16b473fe0261faeda5df33 (diff)
downloadpack-9fe364a15ae01b30d26f5f90b67f01192c427595.tar.gz
pack-9fe364a15ae01b30d26f5f90b67f01192c427595.tar.xz
pack-9fe364a15ae01b30d26f5f90b67f01192c427595.zip
test: signal test failure with exit code
-rw-r--r--test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test.c b/test.c
index 138284a..c06efe5 100644
--- a/test.c
+++ b/test.c
@@ -7,6 +7,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
+#include <stdlib.h>
#include "pack.h"
@@ -143,6 +144,7 @@ TEST(pack_simple_general, "pack simple general")
int main(void)
{
extern struct test __start_tests, __stop_tests;
+ int ret = EXIT_SUCCESS;
pack_trace = PACK_TRACE_OFF;
@@ -157,5 +159,8 @@ int main(void)
fprintf(stderr, "<<<\n");
pack_trace = PACK_TRACE_OFF;
printf("FAIL %s\n", t->desc);
+ ret = EXIT_FAILURE;
}
+
+ return ret;
}