1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-04 14:52:34 +03:00

Merge pull request #277579 from nikstur/openssh-tests-in-separate-derivation

openssh: put tests into passthru
This commit is contained in:
Jörg Thalheim 2024-07-07 19:10:35 +02:00 committed by GitHub
commit c7411f7d53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View file

@ -78,6 +78,7 @@ in rec {
nginx nginx
nodejs nodejs
openssh openssh
opensshTest
php php
postgresql postgresql
python python
@ -139,6 +140,7 @@ in rec {
"nixos.tests.simple" "nixos.tests.simple"
"nixpkgs.jdk" "nixpkgs.jdk"
"nixpkgs.tests-stdenv-gcc-stageCompare" "nixpkgs.tests-stdenv-gcc-stageCompare"
"nixpkgs.opensshTest"
]) ])
]; ];
}; };

View file

@ -36,7 +36,7 @@
, isNixos ? stdenv.hostPlatform.isLinux , isNixos ? stdenv.hostPlatform.isLinux
}: }:
stdenv.mkDerivation { stdenv.mkDerivation (finalAttrs: {
inherit pname version src; inherit pname version src;
patches = [ patches = [
@ -111,7 +111,7 @@ stdenv.mkDerivation {
hardeningEnable = [ "pie" ]; hardeningEnable = [ "pie" ];
doCheck = true; doCheck = false;
enableParallelChecking = false; enableParallelChecking = false;
nativeCheckInputs = [ openssl ] ++ lib.optional (!stdenv.isDarwin) hostname; nativeCheckInputs = [ openssl ] ++ lib.optional (!stdenv.isDarwin) hostname;
preCheck = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' preCheck = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
@ -181,7 +181,11 @@ stdenv.mkDerivation {
inherit withKerberos; inherit withKerberos;
tests = { tests = {
borgbackup-integration = nixosTests.borgbackup; borgbackup-integration = nixosTests.borgbackup;
openssh = nixosTests.openssh; nixosTest = nixosTests.openssh;
openssh = finalAttrs.finalPackage.overrideAttrs (previousAttrs: {
pname = previousAttrs.pname + "-test";
doCheck = true;
});
}; };
}; };
@ -194,4 +198,4 @@ stdenv.mkDerivation {
maintainers = (extraMeta.maintainers or []) ++ (with maintainers; [ eelco aneeshusa ]); maintainers = (extraMeta.maintainers or []) ++ (with maintainers; [ eelco aneeshusa ]);
mainProgram = "ssh"; mainProgram = "ssh";
} // extraMeta; } // extraMeta;
} })

View file

@ -11235,6 +11235,8 @@ with pkgs;
etcDir = "/etc/ssh"; etcDir = "/etc/ssh";
}; };
opensshTest = openssh.tests.openssh;
opensshWithKerberos = openssh.override { opensshWithKerberos = openssh.override {
withKerberos = true; withKerberos = true;
}; };