nixos/php: Move the pcre tests to the php test attribute

This commit is contained in:
Elis Hirwing 2020-03-31 19:06:04 +02:00 committed by talyz
parent 29e1f0d169
commit 0dc95728ba
No known key found for this signature in database
GPG Key ID: 2DED2151F4671A2B
6 changed files with 21 additions and 22 deletions

View File

@ -112,7 +112,7 @@ in rec {
"nixos.tests.nfs4.simple.x86_64-linux" "nixos.tests.nfs4.simple.x86_64-linux"
"nixos.tests.openssh.x86_64-linux" "nixos.tests.openssh.x86_64-linux"
"nixos.tests.pantheon.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.plasma5.x86_64-linux"
"nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux" "nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux"
"nixos.tests.predictable-interface-names.predictable.x86_64-linux" "nixos.tests.predictable-interface-names.predictable.x86_64-linux"

View File

@ -40,7 +40,7 @@ in rec {
nat nat
nfs3 nfs3
openssh openssh
php-pcre php
predictable-interface-names predictable-interface-names
proxy proxy
simple; simple;
@ -108,7 +108,7 @@ in rec {
"nixos.tests.nat.standalone.x86_64-linux" "nixos.tests.nat.standalone.x86_64-linux"
"nixos.tests.nfs3.simple.x86_64-linux" "nixos.tests.nfs3.simple.x86_64-linux"
"nixos.tests.openssh.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.predictable.x86_64-linux"
"nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux" "nixos.tests.predictable-interface-names.predictableNetworkd.x86_64-linux"
"nixos.tests.predictable-interface-names.unpredictable.x86_64-linux" "nixos.tests.predictable-interface-names.unpredictable.x86_64-linux"

View File

@ -241,7 +241,6 @@ in
pgjwt = handleTest ./pgjwt.nix {}; pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {}; pgmanage = handleTest ./pgmanage.nix {};
php = handleTest ./php {}; php = handleTest ./php {};
php-pcre = handleTest ./php-pcre.nix {};
plasma5 = handleTest ./plasma5.nix {}; plasma5 = handleTest ./plasma5.nix {};
plotinus = handleTest ./plotinus.nix {}; plotinus = handleTest ./plotinus.nix {};
postgis = handleTest ./postgis.nix {}; postgis = handleTest ./postgis.nix {};

View File

@ -3,4 +3,5 @@
pkgs ? import ../../.. { inherit system config; } pkgs ? import ../../.. { inherit system config; }
}: { }: {
fpm = import ./fpm.nix { inherit system pkgs; }; fpm = import ./fpm.nix { inherit system pkgs; };
pcre = import ./pcre.nix { inherit system pkgs; };
} }

View File

@ -1,7 +1,6 @@
let
let testString = "can-use-subgroups"; in testString = "can-use-subgroups";
in import ../make-test-python.nix ({ ...}: {
import ./make-test-python.nix ({ ...}: {
name = "php-httpd-pcre-jit-test"; name = "php-httpd-pcre-jit-test";
machine = { lib, pkgs, ... }: { machine = { lib, pkgs, ... }: {
time.timeZone = "UTC"; time.timeZone = "UTC";
@ -10,14 +9,12 @@ import ./make-test-python.nix ({ ...}: {
adminAddr = "please@dont.contact"; adminAddr = "please@dont.contact";
enablePHP = true; enablePHP = true;
phpOptions = "pcre.jit = true"; phpOptions = "pcre.jit = true";
extraConfig = extraConfig = let
let
testRoot = pkgs.writeText "index.php" testRoot = pkgs.writeText "index.php"
'' ''
<?php <?php
preg_match('/(${testString})/', '${testString}', $result); preg_match('/(${testString})/', '${testString}', $result);
var_dump($result); var_dump($result);
?>
''; '';
in in
'' ''

View File

@ -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 { callPackage, config, fetchurl, lib, makeWrapper, stdenv, symlinkJoin
, writeText , autoconf, automake, bison, flex, libtool, pkgconfig, re2c , writeText , autoconf, automake, bison, flex, libtool, pkgconfig, re2c
, apacheHttpd, libargon2, libxml2, pcre, pcre2 , systemd, valgrind , apacheHttpd, libargon2, libxml2, pcre, pcre2 , systemd, valgrind