|
Re: running a command if another fails?: msg#00006python.buildbot.devel
> What's the best way to do this? I thought of running "make check || > cat testsuite.log", but is there a better way? Yeah, personally I'd just add a second step which does 'cat testsuite.log'. That's what I did on the Trial tests, to retrieve the contents of _trial_tmp/test.log . I've thought about adding a 'retrieve file' step that would transfer a file from the buildslave to the master and then add the contents to a LogFile object, but 'cat file' does almost exactly the same thing, so there didn't seem to be much of a point. Thomas's advice is sound, though. Another way to do it would be to have the first step (the one that might fail) set self.build.testsFailed or something, then have the second step (the one that you want to maybe not do) test the same variable and sometimes return SKIPPED. Yet another way that might avoid the "what happens if you insert steps" problem would be to walk through self.build.steps looking for a step with the right name, then look at its results. It'd be nice if there were an easy way to write this (i.e. without having to write so much code), since it's a really common use case. cheers, -Brian ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | buildbotURL: 00006, Nick Trout |
|---|---|
| Next by Date: | Re: runner.py change: 00006, Brian Warner |
| Previous by Thread: | Re: running a command if another fails?i: 00006, Thomas Vander Stichele |
| Next by Thread: | runner: 00006, Nick Trout |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |