curl/tests/libtest
Viktor Szakats 3efba94f77
cmake: allow building tests in unity mode
Makes building tests noticeably faster.

Apply changes/fixes/workarounds to make Unity work:
- rename test variables to avoid collisions or shadowing each other when
  combined into single units.
- add workaround to avoid applying `lib/memdebug.h` overrides to system
  headers declaring/defining `getaddrinfo()`/`freeaddrinfo()` for
  `tests/server/resolve.c`. This replaces a previous workaround that
  worked for that specific source.
- rename test macro `CTRL` clashing with Cygwin `sys/ioctl.h`.
- add include guard to `test.h`.

Also:
- exclude `tests/http/clients` which are all single-source. (like
  `docs/examples`.)

Build time improvements for tests:
- AppVeyor CI:
  - MSVC 2008, 2010: 1 minute faster (4m8s -> 2m56s, 3m19s -> 2m24s)
  - MSVC 2022 arm64: 3.5 minutes faster (10m18s -> 6m48s)
  before: https://ci.appveyor.com/project/curlorg/curl/builds/50522785
  after: https://ci.appveyor.com/project/curlorg/curl/builds/50522942
- GHA:
  - Cygwin: 1.5 minutes faster (3m13s -> 1m43s)
    before: https://github.com/curl/curl/actions/runs/10681535327/job/29605384398
    after: https://github.com/curl/curl/actions/runs/10680818726/job/29603130637
  - Windows:
    before: https://github.com/curl/curl/actions/runs/10680818713
    after: https://github.com/curl/curl/actions/runs/10683850187
    - MSYS2, mingw-w64: 1 minute faster
    - MSVC: 30 seconds faster (3m17s -> 2m48s)
  - macOS: double speed (39s -> 18s)
    before: https://github.com/curl/curl/actions/runs/10680818753/job/29603133447
    after: https://github.com/curl/curl/actions/runs/10683850174/job/29612914515
  - Linux: almost double speed (30/31s -> 18s)
    before: https://github.com/curl/curl/actions/runs/10681535311/job/29605387156
    after: https://github.com/curl/curl/actions/runs/10680818721/job/29603133976
  - non-native: no obvious effect.
    before: https://github.com/curl/curl/actions/runs/10680818722
    after: https://github.com/curl/curl/actions/runs/10683850187
  - Old Linux: Unity mode not supported by old CMake, no effect.

Closes #14765
2024-09-19 21:32:58 +02:00
..
.checksrc
.gitignore
CMakeLists.txt
first.c
lib500.c
lib501.c
lib502.c
lib503.c
lib504.c
lib505.c
lib506.c
lib507.c
lib508.c
lib509.c
lib510.c
lib511.c
lib512.c
lib513.c
lib514.c
lib515.c
lib516.c
lib517.c
lib518.c
lib519.c
lib520.c
lib521.c
lib523.c
lib524.c
lib525.c
lib526.c
lib530.c
lib533.c
lib536.c
lib537.c
lib539.c
lib540.c
lib541.c
lib542.c
lib543.c
lib544.c
lib547.c
lib549.c
lib552.c
lib553.c
lib554.c
lib555.c
lib556.c
lib557.c
lib558.c
lib559.c
lib560.c
lib562.c
lib564.c
lib566.c
lib567.c
lib568.c
lib569.c
lib570.c
lib571.c
lib572.c
lib573.c
lib574.c
lib575.c
lib576.c
lib578.c
lib579.c
lib582.c
lib583.c
lib586.c
lib589.c
lib590.c
lib591.c
lib597.c
lib598.c
lib599.c
lib643.c
lib650.c
lib651.c
lib652.c
lib653.c
lib654.c
lib655.c
lib658.c
lib659.c
lib661.c
lib666.c
lib667.c
lib668.c
lib670.c
lib674.c
lib676.c
lib677.c
lib678.c
lib1156.c
lib1301.c
lib1485.c
lib1500.c
lib1501.c
lib1502.c
lib1506.c
lib1507.c
lib1508.c
lib1509.c
lib1510.c
lib1511.c
lib1512.c
lib1513.c
lib1514.c
lib1515.c
lib1517.c
lib1518.c
lib1520.c
lib1522.c
lib1523.c
lib1525.c
lib1526.c
lib1527.c
lib1528.c
lib1529.c
lib1530.c
lib1531.c
lib1532.c
lib1533.c
lib1534.c
lib1535.c
lib1536.c
lib1537.c
lib1538.c
lib1540.c
lib1541.c
lib1542.c
lib1545.c
lib1550.c
lib1551.c
lib1552.c
lib1553.c
lib1554.c
lib1555.c
lib1556.c
lib1557.c
lib1558.c
lib1559.c
lib1560.c
lib1564.c
lib1565.c
lib1567.c
lib1568.c
lib1569.c
lib1591.c
lib1592.c
lib1593.c
lib1594.c
lib1597.c
lib1598.c
lib1662.c
lib1900.c
lib1901.c
lib1903.c
lib1905.c
lib1906.c
lib1907.c
lib1908.c
lib1910.c
lib1911.c
lib1912.c
lib1913.c
lib1915.c
lib1916.c
lib1918.c
lib1919.c
lib1933.c
lib1934.c
lib1935.c
lib1936.c
lib1937.c
lib1938.c
lib1939.c
lib1940.c
lib1945.c
lib1947.c
lib1948.c
lib1955.c
lib1956.c
lib1957.c
lib1958.c
lib1959.c
lib1960.c
lib1964.c
lib1970.c
lib1971.c
lib1972.c
lib1973.c
lib1974.c
lib1975.c
lib2301.c
lib2302.c
lib2304.c
lib2305.c
lib2306.c
lib2308.c
lib2402.c
lib2404.c
lib2405.c
lib2502.c
lib3010.c
lib3025.c
lib3026.c
lib3027.c
lib3100.c
lib3101.c
lib3102.c
lib3103.c
lib3207.c
libauthretry.c
libntlmconnect.c
libprereq.c
Makefile.am
Makefile.inc
mk-lib1521.pl
notexists.pl
stub_gssapi.c
stub_gssapi.h
test307.pl
test610.pl
test613.pl
test1013.pl
test1022.pl
test.h
testtrace.c
testtrace.h
testutil.c
testutil.h