rfmoz / tuptime

Report historical and statistical real time of the system, keeping it between restarts. Like uptime command but with more interesting output.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RPM %check section?

frankcrawford opened this issue · comments

I've been going through the Fedora package review process and should shortly have tuptime available as part of the various Fedora and EPEL distributions (see https://bugzilla.redhat.com/show_bug.cgi?id=2007918 for more details).

However the question has been raised that there is currently no %check section (it is optional anyway) and what can be done about it? Is there any suitable testing that could be done?

Hi Frank,

Great to know that.

About the tests, on Debian, there are the two, one with a simple "tuptime" and the other with "tuptime -v" because .deb have a special requirement for stderr and the verbose output could have the value information in case of a failed test. Both return '0' as sucess, maybe if "tuptime -v" fits well, it'll be enough.

Take a look to https://github.com/rfrail3/tuptime/tree/master/debian/tests

Thanks,

I just did a quick test with:

%check
tuptime -v

and it fails:

...
+ cd tuptime-5.0.2
+ tuptime -v
/var/tmp/rpm-tmp.VWaVZR: line 32: tuptime: command not found
error: Bad exit status from /var/tmp/rpm-tmp.VWaVZR (%check)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.VWaVZR (%check)

The %check that seems to work is the following one:

%check
python3 src/tuptime -v -f /tmp/tuptime.db

But it really check more things than the definition "Command or series of commands to test the software" because take into relevance the system too. Seems that the %check is done against the work done on %build, but in this case, it's empty. The Tuptime test fits better into Debian definition "i.e. the testing of packages in context as close as possible to a Debian system where the packages subject to testing are properly installed"

As the "%check" is optional, and the current tests don't match the right scope, I leave the .specs file without it.

Ricardo,
Thanks for the quick response, and it isn't a big issue, just a comment from the reviewer that was worth following up.

BTW, there were a couple of other minor comments from the spec file, which I'll push through as a PR shortly.

Frank

Hi Frank,

I'm close to release a new version. Do you want to push any update? Maybe the revised spec file?

Thanks,

Okay, I'll push the updated spec file in the next day or so.

Now pushed updated spec file.

Great, I also updated the specs file on dev branch.