michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 5 months ago
Clone

Blame SOURCES/0001-Make-check-buildroot-check-the-build-files-in-parall.patch

f6faf3
From f23af97c4135013d3134a17c881014fb6e9589c8 Mon Sep 17 00:00:00 2001
f6faf3
From: Florian Festi <ffesti@redhat.com>
f6faf3
Date: Tue, 30 Apr 2019 17:12:35 +0200
f6faf3
Subject: [PATCH] Make check-buildroot check the build files in parallel
f6faf3
f6faf3
Thanks to Denys Vlasenko for pointing this out in rhbz#1704353
f6faf3
---
f6faf3
 scripts/check-buildroot | 3 ++-
f6faf3
 1 file changed, 2 insertions(+), 1 deletion(-)
f6faf3
f6faf3
diff --git a/scripts/check-buildroot b/scripts/check-buildroot
f6faf3
index 0cfb34f39..f91dc767b 100755
f6faf3
--- a/scripts/check-buildroot
f6faf3
+++ b/scripts/check-buildroot
f6faf3
@@ -24,11 +24,12 @@ fi
f6faf3
 
f6faf3
 tmp=$(mktemp ${TMPDIR:-/tmp}/cbr.XXXXXX)
f6faf3
 trap "rm -f $tmp" EXIT
f6faf3
+NCPUS=${RPM_BUILD_NCPUS:-1}
f6faf3
 
f6faf3
 find "$RPM_BUILD_ROOT" \! \( \
f6faf3
     -name '*.pyo' -o -name '*.pyc' -o -name '*.elc' -o -name '.packlist' \
f6faf3
     \) -type f -print0 | \
f6faf3
-    LANG=C xargs -0r grep -F "$RPM_BUILD_ROOT" >$tmp
f6faf3
+    LANG=C xargs -0r -P$NCPUS -n16 grep -F "$RPM_BUILD_ROOT" >>$tmp
f6faf3
 
f6faf3
 test -s "$tmp" && {
f6faf3
     cat "$tmp"
f6faf3
-- 
f6faf3
2.21.0
f6faf3