mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
nixosTests.postgresql-jit: avoid manual imports
Same reasoning as commit before.
This commit is contained in:
parent
a1ae4377e0
commit
65ef7381c8
@ -1,20 +1,15 @@
|
|||||||
{ system ? builtins.currentSystem
|
{ system ? builtins.currentSystem
|
||||||
, config ? {}
|
, config ? {}
|
||||||
, pkgs ? import ../.. { inherit system config; }
|
, pkgs ? import ../.. { inherit system config; }
|
||||||
, package ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
packages = builtins.attrNames (import ../../pkgs/servers/sql/postgresql pkgs);
|
|
||||||
|
|
||||||
mkJitTestFromName = name:
|
|
||||||
mkJitTest pkgs.${name};
|
|
||||||
|
|
||||||
mkJitTest = package: makeTest {
|
mkJitTest = package: makeTest {
|
||||||
name = package.name;
|
name = "postgresql-jit-${package.name}";
|
||||||
meta.maintainers = with lib.maintainers; [ ma27 ];
|
meta.maintainers = with lib.maintainers; [ ma27 ];
|
||||||
nodes.machine = { pkgs, lib, ... }: {
|
nodes.machine = { pkgs, lib, ... }: {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
@ -49,7 +44,7 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if package == null then
|
lib.concatMapAttrs (n: p: { ${n} = mkJitTest p; }) (lib.filterAttrs (n: _: lib.hasSuffix "_jit" n) pkgs.postgresqlVersions)
|
||||||
lib.genAttrs packages mkJitTestFromName
|
// {
|
||||||
else
|
passthru.override = p: mkJitTest p;
|
||||||
mkJitTest package
|
}
|
||||||
|
@ -315,11 +315,7 @@ let
|
|||||||
postgresql-wal-receiver = nixosTests.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
|
postgresql-wal-receiver = nixosTests.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
|
||||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||||
} // lib.optionalAttrs jitSupport {
|
} // lib.optionalAttrs jitSupport {
|
||||||
postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix {
|
postgresql-jit = nixosTests.postgresql-jit.passthru.override finalAttrs.finalPackage;
|
||||||
inherit (stdenv) system;
|
|
||||||
pkgs = self;
|
|
||||||
package = this;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user