curl/tests/tunit
Viktor Szakats f4649425f2
build: fix libcurltool with cmake and tunits, related tidy-ups
Sync how libcurltool is built in different modes and build systems.

cmake:
- build libcurltool with curlx when building shared libcurl.
  To make it possible to use standard libcurl when linking tunits.
  Also syncing this with autotools.
  The remaining difference is that cmake allows to select shared or
  static for curl tool and tests/examples independently.
- fix to link with libcurl instead of libcurlu.
  To sync with autotools and to link with the standard libcurl for
  tool unit tests.
- fix `source_group()` to always include curlx sources.
- add missing 'curlx header files' source group.

autotools:
- build libcurltool without curlx when building static libcurl in
  non-unity builds.
  To avoid double compilation, just to be thrown away at link time.
  Also to sync with unity builds.

both:
- sync source order between autotools and cmake.
- make sure to pass all headers with both autotools and cmake.
  This is a no-op with cmake. Maybe a future patch should make sure
  to not pass those to remove that noise.

Ref: #17696

Closes #17727
2025-06-25 09:57:06 +02:00
..
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt build: fix libcurltool with cmake and tunits, related tidy-ups 2025-06-25 09:57:06 +02:00
Makefile.am build: drop explicit curlx from hdr paths, refer headers with curlx/ prefix 2025-06-23 17:02:43 +02:00
Makefile.inc tests: drop BUNDLE_SRC variable 2025-06-21 10:49:05 +02:00
README.md tests/tunit: make a separate directory for tool-based unit tests 2025-04-08 08:08:05 +02:00
tool1394.c tests: constify, make consts static 2025-06-25 09:57:06 +02:00
tool1604.c tests: drop unused or redundant includes 2025-06-23 13:49:03 +02:00
tool1621.c tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00

Tool unit tests

This directory is for unit testing of tool functions. They are separate from libcurl unit tests, because how these live/work outside of the library and the libcurl unit tests live/work inside.