testers.testEqualArrayOrMap: use default.nix and move recurseIntoAttrs into tests.nix
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#tester-testEqualArrayOrMap
|
||||
# or doc/build-helpers/testers.chapter.md
|
||||
# NOTE: Must be `import`-ed rather than `callPackage`-d to preserve the `override` attribute.
|
||||
testEqualArrayOrMap = import ./testEqualArrayOrMap/tester.nix { inherit lib stdenvNoCC; };
|
||||
testEqualArrayOrMap = import ./testEqualArrayOrMap { inherit lib stdenvNoCC; };
|
||||
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#tester-testVersion
|
||||
# or doc/build-helpers/testers.chapter.md
|
||||
|
||||
@@ -357,5 +357,5 @@ lib.recurseIntoAttrs {
|
||||
'';
|
||||
};
|
||||
|
||||
testEqualArrayOrMap = lib.recurseIntoAttrs (pkgs.callPackages ../testEqualArrayOrMap/tests.nix { });
|
||||
testEqualArrayOrMap = pkgs.callPackages ../testEqualArrayOrMap/tests.nix { };
|
||||
}
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
# `testers.testBuildFailure`. This is due to the fact that `testers.testBuildFailure` modifies the derivation such that
|
||||
# it produces an output containing the exit code, logs, and other things. Since `testers.runCommand` expects the empty
|
||||
# derivation, it produces a hash mismatch.
|
||||
{ runCommand, testers, ... }:
|
||||
{
|
||||
lib,
|
||||
runCommand,
|
||||
testers,
|
||||
}:
|
||||
let
|
||||
inherit (lib.attrsets) recurseIntoAttrs;
|
||||
inherit (testers) testEqualArrayOrMap testBuildFailure;
|
||||
concatValuesArrayToActualArray = ''
|
||||
nixLog "appending all values in valuesArray to actualArray"
|
||||
@@ -18,7 +23,7 @@ let
|
||||
done
|
||||
'';
|
||||
in
|
||||
{
|
||||
recurseIntoAttrs {
|
||||
# NOTE: This particular test is used in the docs:
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#tester-testEqualArrayOrMap
|
||||
# or doc/build-helpers/testers.chapter.md
|
||||
|
||||
Reference in New Issue
Block a user