mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.cryptography: disable tests failing with overcommit (#535423)
This commit is contained in:
commit
7163dc8f60
1 changed files with 13 additions and 9 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchpatch,
|
||||
buildPythonPackage,
|
||||
callPackage,
|
||||
setuptools,
|
||||
|
|
@ -21,21 +22,30 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "cryptography";
|
||||
version = "48.0.0";
|
||||
version = "49.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pyca";
|
||||
repo = "cryptography";
|
||||
tag = version;
|
||||
hash = "sha256-S1oOLou6tE1atqZ6HXwVQDps9BnjiEpRdoZY5VQm+Kg=";
|
||||
hash = "sha256-yHUIGauFZYnjcoROvocT1UqQ0B8ZuVTaJ0ZAfri6T1E=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
hash = "sha256-mp+1Fw8xNBJD1DM8obAqYBP8erxXiP768+ifqRN1Uqs=";
|
||||
hash = "sha256-yMCBu/RGRcEQST8tEWCNgVvlQsp2KamOqt60qvOYdt8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Add test marks where malloc failure is expected on systems with overcommit enabled
|
||||
name = "malloc-overcommit-mark.patch";
|
||||
url = "https://github.com/pyca/cryptography/commit/2efeba9cc67809b67e659bea8eaea680df2135e8.patch";
|
||||
hash = "sha256-06Z+sk2JTJ50CCnPf2vXyPL5BZeI98oc43LpccenzNg=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "--benchmark-disable" ""
|
||||
|
|
@ -71,12 +81,6 @@ buildPythonPackage rec {
|
|||
|
||||
pytestFlags = [ "--disable-pytest-warnings" ];
|
||||
|
||||
disabledTests = [
|
||||
# Tries to allocate 1 TiB with vm.overcommit_memory=1
|
||||
# https://github.com/pyca/cryptography/pull/14782
|
||||
"test_argon2_malloc_failure"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# save compute time by not running benchmarks
|
||||
"tests/bench"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue