From: Dan Fandrich Date: Mon, 13 Mar 2023 01:56:22 +0000 (-0700) Subject: tests: make first.c the same for both lib tests and unit tests X-Git-Tag: curl-8_0_0~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cbfe32fb1f55dae154cb5fb84c1af97318d2ebe;p=thirdparty%2Fcurl.git tests: make first.c the same for both lib tests and unit tests The only difference used to be global variable used in unittest tests. After cb7ed5a removed individual flag overrides for the unittests, first.c was no longer recompiled for unit tests to include the flag, so whether it worked or gave a link error depended on whether it was compiled in libtest or unittest first. This way also speeds up the build by eliminating 40 identical compile invocations. Fixes #10749 --- diff --git a/tests/libtest/first.c b/tests/libtest/first.c index d4ebaaa2cf..932d5bb654 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -85,9 +85,7 @@ char **test_argv; struct timeval tv_test_start; /* for test timing */ -#ifdef UNITTESTS int unitfail; /* for unittests */ -#endif #ifdef CURLDEBUG static void memory_tracking_init(void) diff --git a/tests/libtest/test.h b/tests/libtest/test.h index 65c44ff834..cb2d47ac7a 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -73,9 +73,7 @@ extern int test(char *URL); /* the actual test function provided by each extern char *hexdump(const unsigned char *buffer, size_t len); -#ifdef UNITTESTS extern int unitfail; -#endif /* ** TEST_ERR_* values must be greater than CURL_LAST CURLcode in order