Re: PHPT --SKIPIF--
| From: | Joe Stump | Date: | Thu, 05 Apr 2007 22:46:44 +0000 |
| Subject: | Re: PHPT --SKIPIF-- | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46154@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Basically if you have something like this:
001-test-a.phpt
002-test-b.phpt
I'd like to know in 002-test-b.phpt if 001-test-a.phpt failed. I was able to do this by adding this into my 002-test-b.phpt file:
- --SKIPIF--
<?php
if (file_exists('002-test-a.out')) {
echo 'skip 002-test-a.phpt failed';} ?> It appears to work fine. - --Joe On Apr 5, 2007, at 3:45 PM, Gregory Beaver wrote:
Joe Stump wrote:-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFGFXxWh0MUGpYY9OQRAosEAJ9z29bfBO06t9CUzNH4A6z+b8XXKgCgqMW4 9akg4lpgYEQyXMgF7SfZASk= =Ojof -----END PGP SIGNATURE-----Can you tell a test to skip if a previous test failed? Hrm. I guess if (file_exists('previoustest.out')) returns true? Thoughts? Seems hacky ...Hi Joe, Short answer: no Long answer: Perhaps a bit more information on the problem you're trying to solve would help? You could, theoretically, include the relevant portion of the test in your --SKIPIF-- and use that to determine whether to echo "skip" but if your failure is fatal error-related, that gets tricky, to say the least :) Greg