Richard W.M. Jones
2016-May-03 09:45 UTC
[Libguestfs] [PATCH 1/2] Revert "php: Fix the tests ... again."
This reverts commit 0d69eab98f0bd5dd2d218ce5adcafdeb13f9d90d. --- php/run-php-tests.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh index 80758bd..e5cfc0d 100755 --- a/php/run-php-tests.sh +++ b/php/run-php-tests.sh @@ -28,13 +28,10 @@ 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 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. +# 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. unset LIBGUESTFS_DEBUG unset LIBGUESTFS_TRACE @@ -47,8 +44,4 @@ printenv | grep -E '^(LIBGUESTFS|LIBVIRT|LIBVIRTD|VIRTLOCKD|LD|MALLOC)_' >> env TESTS=$(echo tests/guestfs_*.phpt) echo TESTS: $TESTS -${MAKE:-make} test \ - TESTS="$TESTS" \ - TEST_PHP_EXECUTABLE="$PWD/php-for-tests.sh" \ - REPORT_EXIT_STATUS=1 \ - TEST_TIMEOUT=300 +${MAKE:-make} test TESTS="$TESTS" PHP_EXECUTABLE="$PWD/php-for-tests.sh" REPORT_EXIT_STATUS=1 TEST_TIMEOUT=300 -- 2.7.4
Richard W.M. Jones
2016-May-03 09:45 UTC
[Libguestfs] [PATCH 2/2] php: Fix the tests yet again.
From: Pino Toscano <ptoscano at redhat.com> Move unsetting of LIBGUESTFS_DEBUG & LIBGUESTFS_TRACE into the php-for-tests.sh wrapper. Fixes commit 0d69eab98f0bd5dd2d218ce5adcafdeb13f9d90d. --- php/extension/php-for-tests.sh.in | 12 ++++++++++++ php/run-php-tests.sh | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/php/extension/php-for-tests.sh.in b/php/extension/php-for-tests.sh.in index 0639ce3..283dc47 100755 --- a/php/extension/php-for-tests.sh.in +++ b/php/extension/php-for-tests.sh.in @@ -1,4 +1,16 @@ #!/bin/sh . ./env + +# Setting debug or trace isn't very useful 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. + +unset LIBGUESTFS_DEBUG +unset LIBGUESTFS_TRACE + @PHP@ $@ diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh index e5cfc0d..0663b19 100755 --- a/php/run-php-tests.sh +++ b/php/run-php-tests.sh @@ -24,18 +24,6 @@ cd extension # therefore have to load the environment (from php/extension/env which # is generated below) at the start of each test script. -# As a consequence of above, LIBGUESTFS_DEBUG=1 and LIBGUESTFS_TRACE=1 -# 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. - -unset LIBGUESTFS_DEBUG -unset LIBGUESTFS_TRACE - # This makes a file containing the environment variables we want to set. rm -f env echo "PATH=$PATH" > env -- 2.7.4
Pino Toscano
2016-May-03 09:47 UTC
Re: [Libguestfs] [PATCH 2/2] php: Fix the tests yet again.
On Tuesday 03 May 2016 10:45:15 Richard W.M. Jones wrote:> From: Pino Toscano <ptoscano@redhat.com> > > Move unsetting of LIBGUESTFS_DEBUG & LIBGUESTFS_TRACE into the > php-for-tests.sh wrapper. > > Fixes commit 0d69eab98f0bd5dd2d218ce5adcafdeb13f9d90d. > ---The series LGTM. Thanks, -- Pino Toscano