回复: [PHP-QA] SKIPIF and include problem for an extension test with phpt

From: Date: Mon, 13 Aug 2012 03:58:26 +0000
Subject: 回复: [PHP-QA] SKIPIF and include problem for an extension test with phpt
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-66679@lists.php.net to get a copy of this message
honestly, when I debug my test. I hack the run-test.php script: $ vim run-test.php and debug at LINE: 1487 $output = system_with_timeout("$extra $php $pass_options -q $ini_settings -d display_errors=0 \"$test_skipif\"", $env); eg; echo $output;exit; try to get the command then run it manually. you will get the skip section's output. Yes it's a little annoy, but it works for me :) -- reeze | http://reeze.cn 在 2012年8月13日星期一,上午11:46,Matt Ingenthron 写道: > On 8/12/12 7:30 PM, "Reeze Xia" <reeze.xia@gmail.com > (mailto:reeze.xia@gmail.com)> wrote: > > > > Hi Matt, > > You could try: > > > > $ make test TESTS="--keep-all" > > # or specify the test case > > $ make test TESTS="tests/035.phpt --keep-all" > > > > This will save the skipif section into a php script, eg: tests/001-your-test.skip.php. > > Then you could debug with them. more info: > > > Thanks Reeze, that helps but I still have to run that script all on my own I guess? This > doesn't seem to save the output from running the generated 035.skip.php. > > It's slightly harder because I'll need to chase down how the makefile is setting up > the PHP env, or install the extension each time. > > Thanks for the suggestion though! > > Any other suggestions on making this easier are welcome. Or the fix :) > > Matt > > > > $ php ./run-test.php -h > > > > :) > > > > -- > > reeze | http://reeze.cn > > > > > > 在 2012年8月13日星期一,上午8:35,Matt Ingenthron 写道: > > > > > Hi, > > > > > > I have a test I'm trying to add to an extension where, if there's a local > > > include file with some constants defined, I will want to run this test. > > > If not, then skip the test. > > > > > > In the SKIPIF section, I'm trying to include something that will always be > > > there and it, in turn, is trying to include another file if it exists. > > > The problem I'm having is the defined(<constant>) doesn't seem to be > > > returning what I expect, as even if it is defined (or should be) the test > > > isn't skipped. > > > > > > Is there something special about includes from the SKIPIF section that > > > would cause a problem here? If no, how can I diagnose what's going wrong? > > > The output from the SKIPIF doesn't appear in any of the output files from > > > what I can tell. > > > > > > The SKIPIF is here: > > > > > > https://github.com/ingenthr/php-ext-couchbase/blob/phpt-problem/tests/035.p > > > hpt#L3 > > > and the include file that gets copied over and edited locally is this: > > > > > > https://github.com/ingenthr/php-ext-couchbase/blob/phpt-problem/tests/couch > > > base.local.inc.dist > > > > > > Thanks in advance for any help. > > > > > > Matt > > > > > > > > > -- > > > PHP Quality Assurance Mailing List > > > <http://www.php.net/> > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > >

« previous php.qa (#66679) next »