Add ability to skip tests through environment

This commit is contained in:
adisbladis 2020-01-12 19:56:45 +00:00
parent 136f008a03
commit b520fa1fce
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
2 changed files with 25 additions and 21 deletions

View file

@ -1,6 +1,7 @@
test-19.09:
variables:
NIX_PATH: nixpkgs=channel:nixos-19.09
SKIP_TESTS: manylinux,preferWheel
script:
- nix-shell -p git --run "nix-build --no-out-link --show-trace tests"

View file

@ -7,8 +7,11 @@ let
pep425Python37 = pkgs.callPackage ../pep425.nix { python = pkgs.python37; };
pep425OSX = pkgs.callPackage ../pep425.nix { isLinux = false; };
skipTests = builtins.filter (t: builtins.typeOf t != "list") (builtins.split "," (builtins.getEnv "SKIP_TESTS"));
in
{
builtins.removeAttrs
{
trivial = pkgs.callPackage ./trivial { inherit poetry2nix; };
override = pkgs.callPackage ./override-support { inherit poetry2nix; };
override-default = pkgs.callPackage ./override-default-support { inherit poetry2nix; };
@ -30,5 +33,5 @@ in
# manylinux requires nixpkgs with https://github.com/NixOS/nixpkgs/pull/75763
# Once this is available in 19.09 and unstable we can re-enable the manylinux test
#manylinux = pkgs.callPackage ./manylinux { inherit poetry2nix; };
}
manylinux = pkgs.callPackage ./manylinux { inherit poetry2nix; };
} skipTests