Commit Graph

9 Commits

Author SHA1 Message Date
Viktor Szakats
ac6264366f tidy-up: miscellaneous
- tool_bname: scope an include.
- `endif` comments.
- Markdown fixes.
- comment tidy-ups.
- whitespace, newlines, indent.

Closes #20309
2026-01-15 13:06:13 +01:00
Viktor Szakats
187e219616 runtests: improve XML prolog check, enable -w permanently, fix two tests
To really verify the presence of the XML prolog, also in CI.

- move the prolog check from `loadtest` to `checktest`.
  (load did a soft error, silently skipping the test instead of failing)
- runtests: enable `-w` functionality permanently for all test targets,
  drop the option. It has no measurable performance impact.
- test 798, 1665: add XML prolog.
  Follow-up to f0d277cb0e

Follow-up to b5ea0736bb #19946
Follow-up to 904e7ecb66 #19347

Closes #19970
2025-12-14 12:26:38 +01:00
Viktor Szakats
3f1cd809ee runtests: add options to set minimum number of tests, use them
To detect mistakes made in the runtests framework that reduce
the number of test runs. Before this patch it could go undetected with
a green CI.

The minimum thresholds will need light maintenance going forward (either
bumping them periodically, or adjust if some may fell below minimums for
justified reasons). We may also make minimums tighter or looser, or more
job-specific.

Latest number of test runs for each job can be seen at Test Clutch:
https://testclutch.curl.se/static/reports/feature-matrix.html

Also:
- GHA: set minimums.

Assisted-by: Dan Fandrich

Follow-up to f2a75a14dd
Follow-up to bb1391f943 #19510

Closes #19942
2025-12-12 12:20:22 +01:00
Viktor Szakats
2decbb1c1f runtests: add -m=seconds to override test curl command timeout
To override the curl default of 5 minutes (300000 ms).

Sometimes a simple test data change can result in a stuck test, this
option makes it exit with an error early. Possible future use in CI
or fast machines to prevent a single test taking 5 minutes and failing
the whole job.

Example hangers:

tests/data/test65:
```diff
-<data1000 crlf="yes">
+<data1000 crlf="headers">
```

tests/data/tests993:
```diff
-%repeat[1000 x 95 328485%0d%0a]%</data>
+%repeat[1000 x 95 328485%0d%0a]%
+</data>
```

Closes #19319
2025-11-19 22:04:52 +01:00
Viktor Szakats
904e7ecb66 tests: replace remaining CR bytes with the new macro %CR
There is no more mixed-newline file in the repository after this patch.
Except for`.bat` and `.sln` files (4 in total), all files use LF
newlines.

Also:
- `spacecheck.pl`: drop mixed-EOL exception for test data.
- runtests: add option `-w` to check if test data has stray CR bytes in
  them.
- build: enable the option above in test targets, except the CI-specific
  one where `spacecheck.pl` does this job already.
- tested OK (with expected failures) in CI with stray CRs added.
- cmake: enable option `-a` for the `tests` target. To continue testing
  after a failed test.

Follow-up to 63e9721b63 #19313
Follow-up to 6cf3d7b1b1 #19318
Follow-up to 4d2a05d3fe #19284

Closes #19347
2025-11-06 20:45:45 +01:00
Viktor Szakats
696150b752 runtests: replace --ci with --buidinfo, show OS/Perl version again
I figure OS/Perl version may be useful to see in local runs,
and also in CI runs where `--ci` was not set:
https://curl.se/dev/log.cgi?id=20250820041228-707387#prob1

Also, only show a message if the `diff` tool is missing.

Follow-up to 985f39c0ce #18147
Closes #18329
2025-08-21 13:11:32 +02:00
Viktor Szakats
985f39c0ce runtests: add --ci option, show Env: only when non-empty
To reduce log noise in local test runs:
- move the `buildinfo.txt` dump and header info lines
  `OS:`, `Perl:`, `diff:` behind a `--ci` `runtests.pl` option.
- enable this option for the CI test targets.
- hide `Env:` header info line if empty.
- merge `Env:` output into a single `logmsg()` call.

Closes #18147
2025-08-04 14:55:10 +02:00
Viktor Szakats
75395eb003 scripts: fix to quote the copyright email address
Also:
- fix the generated output in repo files.

Cherry-picked from #17877
Closes #17903
2025-07-12 08:59:44 +02:00
Daniel Stenberg
fa3f889752 tests: move test docs into /docs
In an attempt to make them easier to find.

The man pages runtests.md and testcurl.md are in /docs

The rest of the test documentation is in /docs/tests

Closes #17463
2025-05-28 15:00:03 +02:00