From a06b0e266a4c80a3c3f4174fb5f7616364dacd67 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 2 Oct 2024 11:19:38 +0200 Subject: [PATCH] php8{1..3}Extensions.soap: fix tests See e.g. https://github.com/cachix/devenv/actions/runs/11125063603/job/30922426947#step:7:527 There were multiple issues I observed: * `--offline` not being set causing several tests to try accessing the internet: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://www.w3.org/2009/01/xml.xsd' in /build/php-8.3.12/ext/soap/tests/bugs/bug76348.php:2 I'm not really sure, why this worked before or if a default was flipped. However, the tests are passing on Linux (both x86_64-linux and aarch64-linux for me). * On Darwin, a few more tests are failing like this: reason: php_network_getaddresses: getaddrinfo for localhost failed: nodename nor servname provided, or not known This looks like some sandbox problem on Darwin, but since we have a working test-suite on Linux I figured that's good enough and turned it off on Darwin. --- pkgs/top-level/php-packages.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 898ba5b43fc5..0e4fc0b6ecae 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -160,7 +160,7 @@ in { checkPhase = '' runHook preCheck - NO_INTERACTION=yes SKIP_PERF_SENSITIVE=yes make test + NO_INTERACTION=yes SKIP_PERF_SENSITIVE=yes SKIP_ONLINE_TESTS=yes make test runHook postCheck ''; @@ -656,7 +656,10 @@ in { configureFlags = [ "--enable-soap" ]; - doCheck = stdenv.hostPlatform.isDarwin; # TODO: a couple tests still fail on *-linux + # Some tests are causing issues in the Darwin sandbox with issues + # such as + # Unknown: php_network_getaddresses: getaddrinfo for localhost failed: nodename nor servname provided + doCheck = !stdenv.hostPlatform.isDarwin; internalDeps = [ php.extensions.session ]; patches = lib.optionals (lib.versions.majorMinor php.version == "8.1") [ # Fix tests with libxml2 2.12