[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to abort a test?
From: |
Simon Marchi |
Subject: |
Re: How to abort a test? |
Date: |
Fri, 15 Jan 2016 11:34:56 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 16-01-14 02:48 PM, Pedro Alves wrote:
>> Anyway, the point is not to fix it for my particular case, but to make the
>> general
>> testsuite more robust. I think I'll send a patch for Dejagnu for the
>> "unresolved"
>> solution, and see what the maintainers think.
>
> If you're willing to do the leg work, that's fantastic, of course.
I feel completely stupid now. Just under the line I pasted in my original
message,
there is this comment:
1474 if { [catch "uplevel #0 source $test_file_name"] == 1 } {
1475 # If we have a Tcl error, propogate the exit status do make
1476 # notices the error.
1477 global exit_status exit_error
1478 # exit error is set by a command line option
1479 if { $exit_status == 0 } {
1480 set exit_status $exit_error
1481 }
After searching where this goes, I saw the --status argument to runtest:
--status
Set the exit status to fail on Tcl errors.
Turns out we just need to add this to our runtest invocation to make it return
non-zero
when a test driver, as it calls the test .exp's, fails. So we just need to add
this to
our call to runtest (will send a patch later). Sometimes it can be worth it to
read the
man page first...
- How to abort a test?, Simon Marchi, 2016/01/12
- Re: How to abort a test?, Pedro Alves, 2016/01/14
- Re: How to abort a test?, Simon Marchi, 2016/01/14
- Re: How to abort a test?, Pedro Alves, 2016/01/14
- Re: How to abort a test?, Simon Marchi, 2016/01/14
- Re: How to abort a test?, Pedro Alves, 2016/01/14
- Re: How to abort a test?,
Simon Marchi <=
- Re: How to abort a test?, Ben Elliston, 2016/01/15
- Re: How to abort a test?, Joel Brobecker, 2016/01/17
- Re: How to abort a test?, Simon Marchi, 2016/01/18
- Re: How to abort a test?, Joel Brobecker, 2016/01/21