summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2022-01-02 01:25:27 -0500
committerTodd Zullinger <tmz@pobox.com>2022-01-02 02:26:56 -0500
commitfab9d3f6e2bc0ae87133af4f5b75852c638342a4 (patch)
tree768f89cc1774f9024200fbd8f01cec783892d2a6
parent283408564162619d0c3929772e33418e5ffa30fe (diff)
downloadcgit_EL6-fab9d3f6e2bc0ae87133af4f5b75852c638342a4.tar.gz
use %__make %{?_smp_mflags} to run tests in %check
We use %make_build and %make_install since 5038a3a (Use cgit.conf and config.mak for cgit/git build options, 2018-02-18). The macros allow the make options to be overridden more easily. For the same reason, replace make with %__make when running the test suite. Add %{?_smp_mflags} from the %make_build macro. In testing, this cuts the build time by as much as 30%. In the case of the slowest koji arch (armv7hl), it was 9 minutes 31 seconds before and 6 minutes 33 seconds after. It's a nice speedup. We don't use %make_build directly because it includes the -O option (%{_make_output_sync}) which doesn't play nicely with the test output during an interactive build or while tailing the build logs. We also don't include %{_make_verbose} from %make_build. We set `V = 1` in cgit.conf (and config.mak for git), which is what %{_make_verbose} does. The macro is not defined on EL < 9 either.
-rw-r--r--cgit.spec3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgit.spec b/cgit.spec
index c59d76b..c93d2d5 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -203,7 +203,7 @@ install -Dp -m0644 httpd.conf %{buildroot}%{httpdconfd}/%{name}.conf
%check
-make test
+%__make %{?_smp_mflags} test
%files
@@ -229,6 +229,7 @@ make test
%changelog
* Sun Jan 02 2022 Todd Zullinger <tmz@pobox.com> - 1.2.3-8
- update to git-2.34.1
+- use %%__make to run tests in %%check
* Mon Jul 26 2021 Todd Zullinger <tmz@pobox.com> - 1.2.3-7
- update SELinux README