-
-
Notifications
You must be signed in to change notification settings - Fork 18k
curl: run tests in passthru #178869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl: run tests in passthru #178869
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,8 @@ | |
| , ocamlPackages | ||
| , phpExtensions | ||
| , python3 | ||
| , tests | ||
| , fetchpatch | ||
| }: | ||
|
|
||
| # Note: this package is used for bootstrapping fetchurl, and thus | ||
|
|
@@ -61,14 +63,14 @@ assert wolfsslSupport -> wolfssl != null; | |
| assert zlibSupport -> zlib != null; | ||
| assert zstdSupport -> zstd != null; | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "curl"; | ||
| version = "7.83.1"; | ||
|
|
||
| src = fetchurl { | ||
| urls = [ | ||
| "https://curl.haxx.se/download/${pname}-${version}.tar.bz2" | ||
| "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" | ||
| "https://curl.haxx.se/download/curl-${finalAttrs.version}.tar.bz2" | ||
| "https://github.com/curl/curl/releases/download/curl-${finalAttrs.version}/curl-${finalAttrs.version}.tar.bz2" | ||
| ]; | ||
| sha256 = "sha256-9Tmjb7RKgmDsXZd+Tg290u7intkPztqpvDyfeKETv/A="; | ||
| }; | ||
|
|
@@ -152,7 +154,10 @@ stdenv.mkDerivation rec { | |
| CXX = "${stdenv.cc.targetPrefix}c++"; | ||
| CXXCPP = "${stdenv.cc.targetPrefix}c++ -E"; | ||
|
|
||
| doCheck = true; | ||
| # takes 14 minutes on a 24 core and because many other packages depend on curl | ||
| # they cannot be run concurrently and are a bottleneck | ||
| # tests are available in passthru.tests.withCheck | ||
| doCheck = false; | ||
| preCheck = '' | ||
| patchShebangs tests/ | ||
| '' + lib.optionalString stdenv.isDarwin '' | ||
|
|
@@ -177,16 +182,23 @@ stdenv.mkDerivation rec { | |
| ln $out/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libcurl-gnutls${stdenv.hostPlatform.extensions.sharedLibrary}.4.4.0 | ||
| ''; | ||
|
|
||
| passthru = { | ||
| passthru = let | ||
| useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; }; | ||
| in { | ||
| inherit opensslSupport openssl; | ||
| tests = { | ||
| inherit curlpp coeurl; | ||
| haskell-curl = haskellPackages.curl; | ||
| ocaml-curly = ocamlPackages.curly; | ||
| php-curl = phpExtensions.curl; | ||
| pycurl = python3.pkgs.pycurl; | ||
| withCheck = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one should be a channel blocker if it fails. It should be added to release.nix for the nixpkgs and nixos jobs.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure i did it correctly
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are passthru attributes stripped?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah release.nix is kind of a mess (or maybe I'm unfamiliar) and it strips all packages down using Maybe do something like this in corePackageTests = recurseIntoAttrs {
curl = recurseIntoAttrs pkgs.curl.tests;
};That should give you |
||
| fetchpatch = tests.fetchpatch.simple.override { fetchpatch = fetchpatch.override { fetchurl = useThisCurl fetchurl; }; }; | ||
| curlpp = useThisCurl curlpp; | ||
| coeurl = useThisCurl coeurl; | ||
|
||
| haskell-curl = useThisCurl haskellPackages.curl; | ||
| ocaml-curly = useThisCurl ocamlPackages.curly; | ||
| pycurl = useThisCurl python3.pkgs.pycurl; | ||
| php-curl = useThisCurl phpExtensions.curl; | ||
| # error: attribute 'override' missing | ||
| # Additional checking with support http3 protocol. | ||
| inherit (nixosTests) nginx-http3; | ||
| # nginx-http3 = useThisCurl nixosTests.nginx-http3; | ||
| nginx-http3 = nixosTests.nginx-http3; | ||
|
||
| }; | ||
| }; | ||
|
|
||
|
|
@@ -199,4 +211,4 @@ stdenv.mkDerivation rec { | |
| # Fails to link against static brotli or gss | ||
| broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport); | ||
| }; | ||
| } | ||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.