clan-cli/tests: limit jobs to 16
This reduces overload on the CI, as it already runs multiple test instances in parallel (with-core, without-core, etc), and otherwise would spawn 96 workers for each of those.
This commit is contained in:
@@ -142,7 +142,10 @@ pythonRuntime.pkgs.buildPythonApplication {
|
|||||||
export LOCK_NIX=$TMPDIR/nix_lock
|
export LOCK_NIX=$TMPDIR/nix_lock
|
||||||
mkdir -p "$CLAN_TEST_STORE/nix/store"
|
mkdir -p "$CLAN_TEST_STORE/nix/store"
|
||||||
|
|
||||||
python -m pytest -m "not impure and not with_core" ./tests
|
# limit build cores to 16
|
||||||
|
jobs="$((NIX_BUILD_CORES>16 ? 16 : NIX_BUILD_CORES))"
|
||||||
|
|
||||||
|
python -m pytest -m "not impure and not with_core" -n $jobs ./tests
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
clan-pytest-with-core =
|
clan-pytest-with-core =
|
||||||
@@ -181,7 +184,11 @@ pythonRuntime.pkgs.buildPythonApplication {
|
|||||||
mkdir -p "$CLAN_TEST_STORE/nix/var/nix/gcroots"
|
mkdir -p "$CLAN_TEST_STORE/nix/var/nix/gcroots"
|
||||||
xargs cp --recursive --target "$CLAN_TEST_STORE/nix/store" < "$closureInfo/store-paths"
|
xargs cp --recursive --target "$CLAN_TEST_STORE/nix/store" < "$closureInfo/store-paths"
|
||||||
nix-store --load-db --store "$CLAN_TEST_STORE" < "$closureInfo/registration"
|
nix-store --load-db --store "$CLAN_TEST_STORE" < "$closureInfo/registration"
|
||||||
python -m pytest -m "not impure and with_core" ./tests
|
|
||||||
|
# limit build cores to 16
|
||||||
|
jobs="$((NIX_BUILD_CORES>16 ? 16 : NIX_BUILD_CORES))"
|
||||||
|
|
||||||
|
python -m pytest -m "not impure and with_core" ./tests -n $jobs
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user