From 0d69eab98f0bd5dd2d218ce5adcafdeb13f9d90d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 24 Apr 2016 15:05:02 +0100 Subject: [PATCH] php: Fix the tests ... again. PHP (5?) renamed the PHP_EXECUTABLE variable to TEST_PHP_EXECUTABLE. As a result of that if you enabled debugging, the tests broke because we no longer used our custom PHP wrapper to filter out debugging environment variables before running the tests, so debug output was mixed with the expected output. This commit also updates an old comment telling you how to debug PHP tests. --- php/run-php-tests.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh index e5cfc0d96..80758bdaa 100755 --- a/php/run-php-tests.sh +++ b/php/run-php-tests.sh @@ -28,10 +28,13 @@ cd extension # won't get passed down to the script. Furthermore, setting debug or # trace isn't very useful anyway because the PHP test script mixes # stdout and stderr together and compares this to the expected output, -# so you'd just get failures for every test. So there is no good way -# to debug libguestfs failures in PHP tests, but if an individual test -# fails locally then you can edit the guestfs_php_*.phpt.in and -# uncomment the putenv statement, then look at the output. +# so you'd just get failures for every test. +# +# So there is no good way to debug libguestfs failures in PHP tests, +# but if an individual test fails and you want to find out more, you +# can comment out the following two 'unset' statements. The tests +# will definitely fail if you do this, but you will be able to see the +# debug output in the '*.out' files. unset LIBGUESTFS_DEBUG unset LIBGUESTFS_TRACE @@ -44,4 +47,8 @@ printenv | grep -E '^(LIBGUESTFS|LIBVIRT|LIBVIRTD|VIRTLOCKD|LD|MALLOC)_' >> env TESTS=$(echo tests/guestfs_*.phpt) echo TESTS: $TESTS -${MAKE:-make} test TESTS="$TESTS" PHP_EXECUTABLE="$PWD/php-for-tests.sh" REPORT_EXIT_STATUS=1 TEST_TIMEOUT=300 +${MAKE:-make} test \ + TESTS="$TESTS" \ + TEST_PHP_EXECUTABLE="$PWD/php-for-tests.sh" \ + REPORT_EXIT_STATUS=1 \ + TEST_TIMEOUT=300