Skip to content

Commit

Permalink
test: Move testEqDrv to testSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Oct 14, 2023
1 parent 83c0f5d commit 66ecf37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions effects/nix-darwin/eval-test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ in
rec {
inherit darwin testSupport;
inherit (inputs) flake-parts;
inherit (testSupport) callFlakeOutputs;

testEqDrv = drv1: drv2:
if drv1 == drv2 then true
else builtins.trace "Oh-oh, these are different! Check the differences with\nnix-diff --color=always ${drv1} ${drv2} | less -RS" false;
inherit (testSupport) callFlakeOutputs testEqDrv;

flake1 = callFlakeOutputs (inputs:
flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, self, ... }: {
Expand Down
5 changes: 5 additions & 0 deletions lib/testSupport.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ let
sourceInfo = { };
};

testEqDrv = drv1: drv2:
if drv1 == drv2 then true
else builtins.trace "Oh-oh, these are different! Check the differences with\nnix-diff --color=always ${drv1} ${drv2} | less -RS" false;

in {
inherit
callFlake
callFlakeOutputs
testEqDrv
;
}

0 comments on commit 66ecf37

Please sign in to comment.