Bug 1415938 - Allow to exit with an exit code indicating the tests have failed
Summary: Allow to exit with an exit code indicating the tests have failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: rpmgrill
Classification: Community
Component: Tests
Version: 0.30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 0.31
Assignee: Roman Joost
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-24 06:50 UTC by Roman Joost
Modified: 2017-11-09 00:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-09 00:40:04 UTC


Attachments (Terms of Use)

Description Roman Joost 2017-01-24 06:50:12 UTC
Description of problem:

At this point there is no way to determine if the tests have failed based on the exit of rpmgrill. It always exits with 0, even if tests have failed.


Version-Release number of selected component (if applicable):

0.30

How reproducible:
100%

Steps to Reproduce:
Run rpmgrill against packages with packaging errors. Check the exit code.


Actual results:
Exit status is 0.

Expected results:
Exit code reflects a failed test and should be non-zero

Additional info:

Comment 1 Roman Joost 2017-08-30 07:22:26 UTC
Added feature:

https://github.com/default-to-open/rpmgrill/commit/640941cbcf0ced8fa1f3f51b3fd56e7a950944c2

Had to adjust the rpmgrill-unpack-rpms command to also copy the build logs into the unpack directory.

Comment 2 Roman Joost 2017-11-09 00:39:20 UTC
Tested with broken and not broken RPM packages:

t/data/rpm_with_errors $ rpmgrill unpacked
t/data/rpm_with_errors $ echo $?
1

t/data/rpm_without_errors $ rpmgrill-unpack-rpms .
t/data/rpm_without_errors $ rpmgrill unpacked     
t/data/rpm_without_errors $ echo $?
0

Comment 3 Roman Joost 2017-11-09 00:40:04 UTC
Shipped with 0.31 release:

https://github.com/default-to-open/rpmgrill/releases/tag/0.31


Note You need to log in before you can comment on or make changes to this bug.