forked from mirrors/nixpkgs
tests.overriding: init
only outputs the first failing test atm
This commit is contained in:
parent
b94fa2c253
commit
9c0ac5691c
|
@ -59,6 +59,8 @@ with pkgs;
|
|||
|
||||
nixos-functions = callPackage ./nixos-functions {};
|
||||
|
||||
overriding = callPackage ./overriding.nix { };
|
||||
|
||||
patch-shebangs = callPackage ./patch-shebangs {};
|
||||
|
||||
texlive = callPackage ./texlive {};
|
||||
|
|
23
pkgs/test/overriding.nix
Normal file
23
pkgs/test/overriding.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ lib, pkgs, stdenvNoCC }:
|
||||
|
||||
let
|
||||
tests =
|
||||
let
|
||||
p = pkgs.python3Packages.xpybutil.overridePythonAttrs (_: { dontWrapPythonPrograms = true; });
|
||||
in
|
||||
[
|
||||
({
|
||||
name = "overridePythonAttrs";
|
||||
expr = !lib.hasInfix "wrapPythonPrograms" p.postFixup;
|
||||
expected = true;
|
||||
})
|
||||
];
|
||||
in
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "test-overriding";
|
||||
passthru = { inherit tests; };
|
||||
buildCommand = ''
|
||||
touch $out
|
||||
'' + lib.concatMapStringsSep "\n" (t: "([[ ${lib.boolToString t.expr} == ${lib.boolToString t.expected} ]] && echo '${t.name} success') || (echo '${t.name} fail' && exit 1)") tests;
|
||||
}
|
Loading…
Reference in a new issue