diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2020-05-07 15:47:05 +0200 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2020-05-07 16:17:02 +0200 |
commit | a85b07cbcb7a034bc07dda3642bc68fe621a63ec (patch) | |
tree | aedfe577ea1e289d081349c32385ce995fa6a449 | |
parent | ebb63137ad245d0b9851d8a4de3be49f645b099c (diff) | |
download | nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar.gz nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar.bz2 nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar.lz nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar.xz nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.tar.zst nixpkgs-a85b07cbcb7a034bc07dda3642bc68fe621a63ec.zip |
bashCompletion: speed-up test execution by using xdist
Currently the tests take an eternity and are also sometimes flaky. By following upstream in using xdist for parallel test execution we at least get the feedback cycle down. On my machine that means instead of running this for ~25min it runs in 1 minute and 10 seconds.
-rw-r--r-- | pkgs/shells/bash/bash-completion/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index 8463b1750d1..e5ef70e43a9 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -30,6 +30,10 @@ stdenv.mkDerivation rec { python3Packages.pexpect python3Packages.pytest bashInteractive + + # use xdist to speed up the test run, just like upstream: + # https://github.com/scop/bash-completion/blob/009bf2228c68894629eb6fd17b3dc0f1f6d67615/test/requirements.txt#L4 + python3Packages.pytest_xdist ]; # - ignore test_gcc on ARM because it assumes -march=native @@ -40,7 +44,7 @@ stdenv.mkDerivation rec { # - ignore test_ls because impure logic # - ignore test_screen because it assumes vt terminals exist checkPhase = '' - pytest . \ + pytest -n $NIX_BUILD_CORES . \ ${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ --ignore=test/t/test_chsh.py \ --ignore=test/t/test_ether_wake.py \ |