Skip to content

cmake: extend integration tests#17203

Closed
vszakats wants to merge 44 commits into
curl:masterfrom
vszakats:cm-test-wo-iface-tgt
Closed

cmake: extend integration tests#17203
vszakats wants to merge 44 commits into
curl:masterfrom
vszakats:cm-test-wo-iface-tgt

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Apr 27, 2025

  • GHA: add cmake integration tests for Windows.
  • make them run faster with prefill, unity, Ninja, omitting curl tool.
  • also test static libcurl.
  • add old-cmake support with auto-detection.
  • auto-detect Ninja.
  • run consumer test apps to see if they work.
  • add support for Windows.
  • make it more verbose.
  • re-add ExternalProject cmake consumer test. It's broken.
  • tidy up terminology.

Cherry-picked from #16973

@vszakats vszakats marked this pull request as draft April 27, 2025 10:27
@github-actions github-actions Bot added tests CI Continuous Integration labels Apr 27, 2025
vszakats added 26 commits April 27, 2025 12:59
To avoid weird error affected new cmake, --verbose seems to
accept an option?
This reverts commit de2be21.
Broken (both with old and new cmake):
```
-- TEST_INTEGRATION_MODE: ExternalProject
CMake Error at CMakeLists.txt:49 (find_package):
  Could not find a package configuration file provided by "CURL" with any of
  the following names:

    CURLConfig.cmake
    curl-config.cmake

  Add the installation prefix of "CURL" to CMAKE_PREFIX_PATH or set
  "CURL_DIR" to a directory containing one of the above files.  If "CURL"
  provides a separate development package or SDK, be sure it has been
  installed.
```
@vszakats vszakats changed the title [TEST] cmake: integration tests w/o imported targets cmake: extend integration tests Apr 27, 2025
@vszakats vszakats marked this pull request as ready for review April 27, 2025 11:05
@vszakats
Copy link
Copy Markdown
Member Author

Curious surprise this works out of the box. It either means these tests still
don't actually test stuff we'd like to test, or that the notion of IMPORTED
targets is unnecessary. It'd guess it's the former. Either way this PR is fine
to merge.

@vszakats vszakats closed this in e2a23d5 Apr 27, 2025
@vszakats vszakats deleted the cm-test-wo-iface-tgt branch April 27, 2025 11:23
vszakats added a commit that referenced this pull request Aug 7, 2025
By micromanaging the project dependency and its inclusion into the test
project. It feels like an awkward construct, but perhaps better than
nothing.

It's also fragile because it's a static build with no assistance from
the external project (curl in this case). Mitigated in test by disabling
all dependencies and some features.

Since there is no special core cmake logic to be tested here, in CI
the test is tested really. To keep CI jobs at minimum, only add 3 of
them, taking 42s in total. (All 6 would take 270s.)

Follow-up to e2a23d5 #17203

Closes #18208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration tests

Development

Successfully merging this pull request may close these issues.

1 participant