From: Michael Tremer Date: Thu, 30 Nov 2017 15:28:47 +0000 (+0100) Subject: testsuite: Log to stderr X-Git-Tag: 0.9.28~1285^2~1229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72c9450fdf57878ed28ef0e590869510559ec13c;p=pakfire.git testsuite: Log to stderr 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 --- diff --git a/tests/testsuite.h b/tests/testsuite.h index 417075580..10edd4e57 100644 --- a/tests/testsuite.h +++ b/tests/testsuite.h @@ -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__);