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.
Details
Details
- Reviewers
kparal tflink mkrizek jskladan - Maniphest Tasks
- T450: implement --make-fatal and return non-zero exit code if task fails
runtask with passed and failed rpmlint, both with and without --fatal
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Branch
- feature/T450
- Lint
Lint OK - Unit
No Unit Test Coverage
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. |
Comment Actions
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.
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.