New argument to return non-zero code when failed
AbandonedPublic

Authored by lbrabec on Jul 14 2015, 1:10 PM.

Details

Summary

New argument --fatal added. Runner now collects last export. If --fatal was passed, last outcome is extracted from last export and return code set accordingly to it. WIP, open for discussion.

Test Plan

runtask with passed and failed rpmlint, both with and without --fatal

Diff Detail

Repository
rLTRN libtaskotron
Branch
feature/T450
Lint
Lint OK
Unit
No Unit Test Coverage
lbrabec retitled this revision from to New argument to return non-zero code when failed.Jul 14 2015, 1:10 PM
lbrabec updated this object.
lbrabec edited the test plan for this revision. (Show Details)
lbrabec added reviewers: kparal, mkrizek, tflink, jskladan.
jskladan requested changes to this revision.Jul 15 2015, 8:15 AM
jskladan added inline comments.
libtaskotron/runner.py
277

I don't really like, that when no export is used we end with 0, but when the last export is not TAP, this will just die on the TaskotronValueError('Failed to parse TAP contents: %s' % e) exeption. I'd rather log warning/error about no/wrong TAP being present in the last_export, and ended with sys.exit(101) or something in the likes of that.

This revision now requires changes to proceed.Jul 15 2015, 8:15 AM

I think we forgot that we can't easily tell what the task result is and what isn't, and relying on export is not a good idea. I proposed different ways of implementation in T450. Comments welcome.

lbrabec abandoned this revision.Jul 15 2015, 2:00 PM

Seems that thing have taken different direction, abandoning this diff.