Skip to content

tests: bundle http clients, de-dupe, enable for MSVC#17627

Closed
vszakats wants to merge 65 commits intocurl:masterfrom
vszakats:clients-bundle
Closed

tests: bundle http clients, de-dupe, enable for MSVC#17627
vszakats wants to merge 65 commits intocurl:masterfrom
vszakats:clients-bundle

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Jun 15, 2025

To make building the http client tests faster, with no duplication, by
using the build method that other test binaries already use.

The difference compared to other tests is that these don't use internal
libcurl headers or code. With the exception of curl_config.h, for
a feature macro.

Before this patch, these tests were built like examples.

Also:


AppVeyor CI:
before: https://ci.appveyor.com/project/curlorg/curl/builds/52239747
after: https://ci.appveyor.com/project/curlorg/curl/builds/52239856

@vszakats vszakats changed the title tests: bundle http clients tests: bundle http clients, de-dupe, fix for MSVC Jun 15, 2025
@vszakats vszakats changed the title tests: bundle http clients, de-dupe, fix for MSVC tests: bundle http clients, de-dupe, enable for MSVC Jun 15, 2025
@vszakats vszakats force-pushed the clients-bundle branch 2 times, most recently from 47a49a3 to f4a518e Compare June 15, 2025 23:51
@vszakats vszakats requested a review from icing June 16, 2025 06:39
@vszakats vszakats closed this in 739c09c Jun 16, 2025
@vszakats vszakats deleted the clients-bundle branch June 16, 2025 10:30
vszakats added a commit that referenced this pull request Jun 16, 2025
Sync build properties with libtests.

This allows accessing macros from `curl_config.h`, for feature flags.
Smoothens out platform bumps, allowing to drop local replicas from
client sources. It enables using Windows wrappers, e.g. for `fopen()`.

Also fix client sources to use `curl_mfprintf()` where curl format
strings are used. (To avoid build failure with older mingw-w64, e.g.
6.4.0 in CI.)

Follow-up to 739c09c #17627

Closes #17642
denandz pushed a commit to denandz/curl that referenced this pull request Jun 21, 2025
To make building the http client tests faster, with no duplication, by
using the build method that other test binaries already use.

The difference compared to other tests is that these don't use internal
libcurl headers or code. With the exception of `curl_config.h`, for
a feature macro.

Before this patch, these tests were built like examples.

Also:
- de-duplicate code and give unique names to colliding symbols.
- add local getopt implementation and enable all code for MSVC.
  Adapted for curl via Public Domain source:
  https://github.com/skeeto/getopt/blob/4e618ef782dc80b2cf0307ea74b68e6a62b025de/getopt.h
  Credits-to: Christopher Wellons
  Thanks!

Closes curl#17627
denandz pushed a commit to denandz/curl that referenced this pull request Jun 21, 2025
Sync build properties with libtests.

This allows accessing macros from `curl_config.h`, for feature flags.
Smoothens out platform bumps, allowing to drop local replicas from
client sources. It enables using Windows wrappers, e.g. for `fopen()`.

Also fix client sources to use `curl_mfprintf()` where curl format
strings are used. (To avoid build failure with older mingw-w64, e.g.
6.4.0 in CI.)

Follow-up to 739c09c curl#17627

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

Development

Successfully merging this pull request may close these issues.

1 participant