From fab9d3f6e2bc0ae87133af4f5b75852c638342a4 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sun, 2 Jan 2022 01:25:27 -0500 Subject: 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. --- cgit.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 - 1.2.3-8 - update to git-2.34.1 +- use %%__make to run tests in %%check * Mon Jul 26 2021 Todd Zullinger - 1.2.3-7 - update SELinux README -- cgit