Rodent of Unusual Size wrote:
* On 2002-01-21 at 21:41, Stas Bekman <[EMAIL PROTECTED]> excited the electrons to say:
OK, be it 0xC8 . Try this patch then:
Index: Apache-Test/lib/Apache/TestRun.pm ===================================================================
:
+ # logically OR 0xff to the status, so we can distinguish + # harness failure from tests failure. it's possible that the + # failing test won't set a proper $? + exit_shell ($?||1) | TEST_FAILED_MASK;
Er, unless I'm missing something (entirely possible), this will
never return 0xc8.. If $? == 0..1, it'll return 0xc9.
Of course, I thought that's what you want, so you can do a binary and and figure out what has failed.
BTW, this comment is wrong, should be: # Binary OR'ing with exit_status with TEST_FAILED_MASK, so # when the program exits one can tell test failures from # harness failures if 'exit_status && TEST_FAILED_MASK' is # true.
I didn't mean use 0xc8 as a *mask* (since that makes shell manipulation of the bits a pain), but as a value:
if failed(harness) { exit(0xc8) } else { exit(whatever test status was) }
If the harness fails to run properly, I doubt any test results are going to be meaningful, so an OR mask doesn't seem useful. I proposed 0xc8 (200d) because it didn't look as though anything else could return it.
OK, but harness may fail for different reasons, why do you want to scratch the status code of the failure? Currently you don't care, but someone may want to know the failure status and program the launching program to act accordingly.
_____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/