git.iko.soy/typeable/nixpkgs
on master help sign in
nixosTests.php-pcre: Port tests to python
commit1bf1ec35bca08d05b06bf6c627b2a1205bdca2ad authorChristian Kampka <christian@kampka.net> dateSun 15 Dec 2019, 18:41 (7 years ago) parentd029e28
1 file changed+5−4
nixos/tests/php-pcre.nix+5−4
nixos/tests/php-pcre.nix+5−4
@@ -1,7 +1,7 @@
11
22let testString = "can-use-subgroups"; in
33
4−import ./make-test.nix ({ ...}: {
4+import ./make-test-python.nix ({ ...}: {
55 name = "php-httpd-pcre-jit-test";
66 machine = { lib, pkgs, ... }: {
77 time.timeZone = "UTC";
@@ -31,9 +31,10 @@ import ./make-test.nix ({ ...}: {
3131 };
3232 testScript = { ... }:
3333 ''
34− $machine->waitForUnit('httpd.service');
34+ machine.wait_for_unit("httpd.service")
3535 # Ensure php evaluation by matching on the var_dump syntax
36− $machine->succeed('curl -vvv -s http://127.0.0.1:80/index.php \
37− | grep "string(${toString (builtins.stringLength testString)}) \"${testString}\""');
36+ assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed(
37+ "curl -vvv -s http://127.0.0.1:80/index.php"
38+ )
3839 '';
3940})