curl-curl/tests/tunit
Viktor Szakats e785e898a6
checksrc: avoid extra runs in CI, enable more check locally, fix fallouts
To avoid redundant work in CI and to avoid a single checksrc issue make
all autotools jobs fail. After this patch checksrc issues make fail
the checksrc job, the `dist / verify-out-of-tree-autotools-debug`,
`dist / maketgz-and-verify-in-tree`  jobs and the fuzzer job (if run).
Of these, the `dist` jobs replicate local builds, also testing the build
logic.

Also add a script to check the complete local repository, optionally
with the build tree to verify generated C files.

Also:
- automatically run checksrc in subdirectories having a `checksrc`
  target. (examples, OS400, tests http/client, unit and tunit)
- tests/libtest: make sure to run `checksrc` on generated `lib1521.c`.
  (requires in-tree autotools build.)
- tests: run `checksrc` on targets also for non-`DEBUGBUILD`
  builds. It ensures to check `lib1521.c` in CI via job
  `dist / maketgz-and-verify-in-tree`.
- src: drop redundant `$(builddir)` in autotools builds.
- scripts: add `checksrc-all.sh` script to check all C sources and
  the build directory as an option.
- use the above from CI, also make it verify all generated sources.
- silence `checksrc` issues in generated C sources.
- checksrc: add `-v` option to enable verbose mode.
- checksrc: make verbose mode show checked filename and fix to only
  return error on failure.
- make sure that generated C files pass `checksrc`.

Assisted-by: Daniel Stenberg

Closes #17376
2025-05-19 18:59:50 +02:00
..
.gitignore tests: fixup tunit tests for cmake 2025-04-14 21:31:39 +02:00
CMakeLists.txt curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
Makefile.am checksrc: avoid extra runs in CI, enable more check locally, fix fallouts 2025-05-19 18:59:50 +02:00
Makefile.inc tests: separate tunit tests from unit tests more 2025-05-06 17:25:22 +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/tunit: make a separate directory for tool-based unit tests 2025-04-08 08:08:05 +02:00
tool1604.c tests/tunit: make a separate directory for tool-based unit tests 2025-04-08 08:08:05 +02:00
tool1621.c test1621: Improve stripcredentials tests 2025-05-10 15:07:53 -07: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.