diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 9377a931a75e..b23c17a1b696 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -112,7 +112,7 @@ in rec { "nixos.tests.nfs4.simple.x86_64-linux" "nixos.tests.openssh.x86_64-linux" "nixos.tests.pantheon.x86_64-linux" - "nixos.tests.php-pcre.x86_64-linux" + "nixos.tests.php.x86_64-linux" "nixos.tests.plasma5.x86_64-linux" "nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux" "nixos.tests.predictable-interface-names.predictable.x86_64-linux" diff --git a/nixos/release-small.nix b/nixos/release-small.nix index 2a15073b6698..d78788d05315 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -40,7 +40,7 @@ in rec { nat nfs3 openssh - php-pcre + php predictable-interface-names proxy simple; @@ -108,7 +108,7 @@ in rec { "nixos.tests.nat.standalone.x86_64-linux" "nixos.tests.nfs3.simple.x86_64-linux" "nixos.tests.openssh.x86_64-linux" - "nixos.tests.php-pcre.x86_64-linux" + "nixos.tests.php.x86_64-linux" "nixos.tests.predictable-interface-names.predictable.x86_64-linux" "nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux" "nixos.tests.predictable-interface-names.unpredictable.x86_64-linux" diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e003372ef9d4..1f8f0d49a850 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -241,7 +241,6 @@ in pgjwt = handleTest ./pgjwt.nix {}; pgmanage = handleTest ./pgmanage.nix {}; php = handleTest ./php {}; - php-pcre = handleTest ./php-pcre.nix {}; plasma5 = handleTest ./plasma5.nix {}; plotinus = handleTest ./plotinus.nix {}; postgis = handleTest ./postgis.nix {}; diff --git a/nixos/tests/php/default.nix b/nixos/tests/php/default.nix index c5735bd664d7..9ab14f722d08 100644 --- a/nixos/tests/php/default.nix +++ b/nixos/tests/php/default.nix @@ -3,4 +3,5 @@ pkgs ? import ../../.. { inherit system config; } }: { fpm = import ./fpm.nix { inherit system pkgs; }; + pcre = import ./pcre.nix { inherit system pkgs; }; } diff --git a/nixos/tests/php-pcre.nix b/nixos/tests/php/pcre.nix similarity index 56% rename from nixos/tests/php-pcre.nix rename to nixos/tests/php/pcre.nix index d5c22e0582a0..56a87778579f 100644 --- a/nixos/tests/php-pcre.nix +++ b/nixos/tests/php/pcre.nix @@ -1,7 +1,6 @@ - -let testString = "can-use-subgroups"; in - -import ./make-test-python.nix ({ ...}: { +let + testString = "can-use-subgroups"; +in import ../make-test-python.nix ({ ...}: { name = "php-httpd-pcre-jit-test"; machine = { lib, pkgs, ... }: { time.timeZone = "UTC"; @@ -10,15 +9,13 @@ import ./make-test-python.nix ({ ...}: { adminAddr = "please@dont.contact"; enablePHP = true; phpOptions = "pcre.jit = true"; - extraConfig = - let + extraConfig = let testRoot = pkgs.writeText "index.php" - '' - - ''; + ''; in '' Alias / ${testRoot}/ @@ -30,11 +27,11 @@ import ./make-test-python.nix ({ ...}: { }; }; testScript = { ... }: - '' - machine.wait_for_unit("httpd.service") - # Ensure php evaluation by matching on the var_dump syntax - assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed( - "curl -vvv -s http://127.0.0.1:80/index.php" - ) - ''; + '' + machine.wait_for_unit("httpd.service") + # Ensure php evaluation by matching on the var_dump syntax + assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed( + "curl -vvv -s http://127.0.0.1:80/index.php" + ) + ''; }) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 3692191e121f..7daf32e5127c 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -1,4 +1,6 @@ -# pcre functionality is tested in nixos/tests/php-pcre.nix +# We have tests for PCRE and PHP-FPM in nixos/tests/php/ or +# both in the same attribute named nixosTests.php + { callPackage, config, fetchurl, lib, makeWrapper, stdenv, symlinkJoin , writeText , autoconf, automake, bison, flex, libtool, pkgconfig, re2c , apacheHttpd, libargon2, libxml2, pcre, pcre2 , systemd, valgrind