sage: avoid running out of memory during tests

This commit is contained in:
Timo Kaufmann 2019-08-16 23:50:55 +02:00
parent 69d9700c61
commit 41bb319462

View File

@ -51,6 +51,10 @@ stdenv.mkDerivation rec {
export HOME="$TMPDIR/sage-home"
mkdir -p "$HOME"
# avoid running out of memory with many threads in subprocesses, see
# https://github.com/NixOS/nixpkgs/pull/65802
export GLIBC_TUNABLES=glibc.malloc.arena_max=4
echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
"sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
'';