#16 [RFE] Possibility to run rpkg local without %check phase independently on spec content
Closed 5 years ago by frostyx. Opened 5 years ago by frostyx.

I would like to have a possibility to run rpkg local without executing the %check phase of the spec. I would be very happy if it is going to be spec-independent. Tito allows it by

tito build --rpm --rpmbuild-option=--nocheck

I know that such things should be generally avoided, but from time to time you want to build a package and e.g. install it to your own docker container, you are aware that some random test, that is not related to a thing that you are working on, fails and you literally don't care that it fails.

In such cases, I want to be able to build the package without running the tests. I am going to comment out the %check section, commit it, build it and revert it anyway, so the absence of such feature is not any good in terms of "promoting the best practices".

It is currently possible to workaround this by

%bcond_without check

%check
%if %{with check}
./run_tests.sh
%endif

but this is spec dependent and I usually end up finding that the particular spec doesn't support this and need to workaround it but commenting out the tests.


Metadata Update from @clime:
- Issue assigned to clime

5 years ago

Hello,

I added --nocheck option for local in https://pagure.io/rpkg-util/c/dcc6c4045a6087f0a67ab9a323e99643aeb43628?branch=master

Currently rpkg version 3.0 is under development so it will, certainly, be a part of that release.

Would you like this backported to version 2.6 as well?

Awesome, thank you!

Would you like this backported to version 2.6 as well?

Nah, I am fine with it being in 3.0. If I need it earlier, I will install rpkg-util from git.

Ok, thanks. Let me know if I can close this one.

I haven't tried it yet, but the code looks alright. I will close the issue and reopen if I find any issues with it.

Metadata Update from @frostyx:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata