diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 08d9a9363b..e4e9dbd8c8 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -27,6 +27,10 @@ #include /* for setlocale() */ #endif +#if defined(UNITTESTS) && !defined(BUILDING_LIBCURL) +#include "tool_stderr.h" /* for tool_init_stderr() */ +#endif + int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, struct timeval *tv) { @@ -276,6 +280,10 @@ int main(int argc, const char **argv) testnum = (int)num; } +#if defined(UNITTESTS) && !defined(BUILDING_LIBCURL) + tool_init_stderr(); +#endif + result = entry_func(URL); curl_mfprintf(stderr, "Test ended with result %d\n", result);