]> git.ipfire.org Git - pakfire.git/commitdiff
testsuite: Log to stderr
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 15:28:47 +0000 (16:28 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Nov 2017 15:28:47 +0000 (16:28 +0100)
Log messages will get written in non-consecutive order
if the library logs on stderr and the testsuite to stdout.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/testsuite.h

index 417075580e4c15a771bc2cd7039f01c40342a094..10edd4e5772b9c49784d9a26cfa6559c8cd6dffd 100644 (file)
@@ -49,7 +49,7 @@ testsuite_t* testsuite_create(size_t n);
 int testsuite_add_test(testsuite_t* ts, const char* name, test_function_t func);
 int testsuite_run(testsuite_t* ts);
 
-#define _LOG(prefix, fmt, ...) printf("TESTS: " prefix fmt, ## __VA_ARGS__);
+#define _LOG(prefix, fmt, ...) fprintf(stderr, "TESTS: " prefix fmt, ## __VA_ARGS__);
 #define LOG(fmt, ...) _LOG("", fmt, ## __VA_ARGS__);
 #define LOG_WARN(fmt, ...) _LOG("WARN: ", fmt, ## __VA_ARGS__);
 #define LOG_ERROR(fmt, ...) _LOG("ERROR: ", fmt, ## __VA_ARGS__);