mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:03:33 +03:00
build: untangle UNITTESTS and DEBUGBUILD macros
- fix `DEBUGBUILD` guards that should be `UNITTESTS`, in libcurl code used by unit tests. - fix guards for libcurl functions used in unit tests only. - sync `UNITTEST` attribute between declarations and definitions. - drop `DEBUGBUILD` guard from test `unit2600`. - fix guards for libcurl HSTS code used by both a unit test (`unit1660`) and `test0446`. - update an existing AppVeyor CI job to test the issues fixed. This fixes building tests with `CURLDEBUG` enabled but `DEBUGBUILD` disabled. This can happen when building tests with CMake with `ENABLE_DEBUG=ON` in Release config, or with `ENABLE_CURLDEBUG=ON` and _without_ `ENABLE_DEBUG=ON`. Possibly also with autotools when using `--enable-curldebug` without `--enable-debug`. Test results: - before: https://ci.appveyor.com/project/curlorg/curl/builds/49835609 https://ci.appveyor.com/project/curlorg/curl/builds/49898529/job/k8qpbs8idby70smw https://github.com/curl/curl/actions/runs/9259078835/job/25470318167?pr=13798#step:13:821 - after: https://ci.appveyor.com/project/curlorg/curl/builds/49839255 (the two failures are unrelated, subject to PR #13705) Ref: #13592 (issue discovery) Ref: #13689 (CI testing this PR with `DEBUGBUILD`/`CURLDEBUG` combinations) Closes #13694
This commit is contained in:
parent
8373783098
commit
fc8e0dee30
15 changed files with 50 additions and 48 deletions
|
|
@ -30,9 +30,9 @@ size_t Curl_is_absolute_url(const char *url, char *buf, size_t buflen,
|
|||
|
||||
CURLUcode Curl_url_set_authority(CURLU *u, const char *authority);
|
||||
|
||||
#ifdef DEBUGBUILD
|
||||
CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
|
||||
bool has_scheme);
|
||||
#ifdef UNITTESTS
|
||||
UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
|
||||
bool has_scheme);
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CURL_URLAPI_INT_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue