Commit 4e6be8f3 authored by Connor Baker's avatar Connor Baker
Browse files

testers.testEqualArrayOrMap: use default.nix and move recurseIntoAttrs into tests.nix

parent abf9e606
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -357,5 +357,5 @@ lib.recurseIntoAttrs {
      '';
  };

  testEqualArrayOrMap = lib.recurseIntoAttrs (pkgs.callPackages ../testEqualArrayOrMap/tests.nix { });
  testEqualArrayOrMap = pkgs.callPackages ../testEqualArrayOrMap/tests.nix { };
}
+7 −2
Original line number Diff line number Diff line
@@ -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