python3Packages.cryptography: disable tests failing with overcommit
This commit is contained in:
committed by
Martin Weinelt
parent
c07b089cad
commit
fbc8fd8ee3
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchpatch,
|
||||
buildPythonPackage,
|
||||
callPackage,
|
||||
setuptools,
|
||||
@@ -36,6 +37,15 @@ buildPythonPackage rec {
|
||||
hash = "sha256-mp+1Fw8xNBJD1DM8obAqYBP8erxXiP768+ifqRN1Uqs=";
|
||||
};
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user