#1053 docker: fix the tito command for building packages without running tests
Merged 4 years ago by praiskup. Opened 4 years ago by frostyx.
copr/ frostyx/copr docker-tito-nocheck  into  master

file modified
+1 -1
@@ -70,7 +70,7 @@ 

  

  # build packages from sources

  RUN cd /copr/backend && \

-     tito build --rpm --test --rpmbuild-options='--without=check'

+     tito build --rpm --test --rpmbuild-options='--nocheck'

  

  # upgrade the already pre-installed packages if possible

  RUN dnf -y upgrade /tmp/tito/noarch/copr-backend*.noarch.rpm ; \

file modified
+1 -1
@@ -48,7 +48,7 @@ 

  

  RUN cd /copr/rpmbuild && \

      dnf builddep -y *spec && \

-     tito build --rpm --test --rpmbuild-options='--without=check' && \

+     tito build --rpm --test --rpmbuild-options='--nocheck' && \

      dnf -y install /tmp/tito/x86_64/copr-{rpmbuild,builder}*.x86_64.rpm --allowerasing && \

      dnf clean all

  

file modified
+1 -1
@@ -23,7 +23,7 @@ 

  

  RUN cd /copr/dist-git && \

      dnf builddep -y *spec && \

-     tito build --rpm --test --rpmbuild-options='--without=check' && \

+     tito build --rpm --test --rpmbuild-options='--nocheck' && \

      ( dnf -y install /tmp/tito/noarch/copr-dist-git*.noarch.rpm || true ) && \

      dnf clean all

  

file modified
+1 -1
@@ -28,7 +28,7 @@ 

  # build and install copr-frontend

  RUN cd /copr/frontend && \

      dnf builddep -y *spec && \

-     tito build --rpm --test --rpmbuild-options='--without=check' && \

+     tito build --rpm --test --rpmbuild-options='--nocheck' && \

      ( dnf -y install /tmp/tito/noarch/copr-frontend*.noarch.rpm || true ) && \

      dnf clean all

  

There are two ways to build a package without running tests:

1) Using --rpmbuild-options='--without=check'
which is currently in our Dockerfiles. The problem here is, that
the spec file needs to support it, e.g.

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

Not all of our packages do this. For example copr-backend doesn't.

2) Using --rpmbuild-options='--nocheck'
which works in all cases. Therefore, I switching to it.

Commit c611b17 fixes this pull-request

Pull-Request has been merged by praiskup

4 years ago