summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2020-03-31 19:06:04 +0200
committertalyz <kim.lindberger@gmail.com>2020-04-05 16:44:59 +0200
commit0dc95728bac36c3711009e0611b7b31c402a959e (patch)
tree9e7bcb8270b40aca70370efe2becdebd461731a3 /nixos
parent29e1f0d1691ee1b02dc9dd2af24a6f1b169a1f21 (diff)
downloadnixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar.gz
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar.bz2
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar.lz
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar.xz
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.tar.zst
nixpkgs-0dc95728bac36c3711009e0611b7b31c402a959e.zip
nixos/php: Move the pcre tests to the php test attribute
Diffstat (limited to 'nixos')
-rw-r--r--nixos/release-combined.nix2
-rw-r--r--nixos/release-small.nix4
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/php/default.nix1
-rw-r--r--nixos/tests/php/pcre.nix (renamed from nixos/tests/php-pcre.nix)31
5 files changed, 18 insertions, 21 deletions
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index 9377a931a75..b23c17a1b69 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 2a15073b669..d78788d0531 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 e003372ef9d..1f8f0d49a85 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 c5735bd664d..9ab14f722d0 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
index d5c22e0582a..56a87778579 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"
-        ''
-          <?php
+          ''
+            <?php
             preg_match('/(${testString})/', '${testString}', $result);
             var_dump($result);
-          ?>
-        '';
+          '';
       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"
+      )
+    '';
 })