mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +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
|
||||
, config ? {}
|
||||
, pkgs ? import ../.. { inherit system config; }
|
||||
, package ? null
|
||||
}:
|
||||
|
||||
with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
packages = builtins.attrNames (import ../../pkgs/servers/sql/postgresql pkgs);
|
||||
|
||||
mkJitTestFromName = name:
|
||||
mkJitTest pkgs.${name};
|
||||
|
||||
mkJitTest = package: makeTest {
|
||||
name = package.name;
|
||||
name = "postgresql-jit-${package.name}";
|
||||
meta.maintainers = with lib.maintainers; [ ma27 ];
|
||||
nodes.machine = { pkgs, lib, ... }: {
|
||||
services.postgresql = {
|
||||
@ -49,7 +44,7 @@ let
|
||||
'';
|
||||
};
|
||||
in
|
||||
if package == null then
|
||||
lib.genAttrs packages mkJitTestFromName
|
||||
else
|
||||
mkJitTest package
|
||||
lib.concatMapAttrs (n: p: { ${n} = mkJitTest p; }) (lib.filterAttrs (n: _: lib.hasSuffix "_jit" n) pkgs.postgresqlVersions)
|
||||
// {
|
||||
passthru.override = p: mkJitTest p;
|
||||
}
|
||||
|
@ -315,11 +315,7 @@ let
|
||||
postgresql-wal-receiver = nixosTests.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
} // lib.optionalAttrs jitSupport {
|
||||
postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix {
|
||||
inherit (stdenv) system;
|
||||
pkgs = self;
|
||||
package = this;
|
||||
};
|
||||
postgresql-jit = nixosTests.postgresql-jit.passthru.override finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user