summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2021-02-28 21:16:08 +0100
committerElis Hirwing <elis@hirwing.se>2021-03-02 09:22:33 +0100
commitdb439da3cdc5d3162dd275a54dcbb6d94f7230cd (patch)
tree794999f3a476a05f877dbfa33270d51a1e142b01
parent1216baaee11d203b857baeb5808d4220a1774068 (diff)
nixos/tests/php: Select the right versions of the tests depending on version
-rw-r--r--nixos/tests/all-tests.nix3
-rw-r--r--pkgs/development/interpreters/php/generic.nix3
2 files changed, 5 insertions, 1 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 773f91d86042..7d676e15fa97 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -307,6 +307,9 @@ in
pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {};
php = handleTest ./php {};
+ php73 = handleTest ./php { php = pkgs.php73; };
+ php74 = handleTest ./php { php = pkgs.php74; };
+ php80 = handleTest ./php { php = pkgs.php80; };
pinnwand = handleTest ./pinnwand.nix {};
plasma5 = handleTest ./plasma5.nix {};
pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {};
diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix
index ec5f955370f3..659157e24c4a 100644
--- a/pkgs/development/interpreters/php/generic.nix
+++ b/pkgs/development/interpreters/php/generic.nix
@@ -112,7 +112,8 @@ let
withExtensions = mkWithExtensions allArgs allExtensionFunctions;
phpIni = "${phpWithExtensions}/lib/php.ini";
unwrapped = php;
- tests = nixosTests.php;
+ # Select the right php tests for the php version
+ tests = nixosTests."php${lib.strings.replaceStrings [ "." ] [ "" ] (lib.versions.majorMinor php.version)}";
inherit (php-packages) extensions buildPecl;
packages = php-packages.tools;
meta = php.meta // {