diff mbox series

ci/test-configs.sh: use nproc

Message ID 20220318151225.927738-1-michael.adler@siemens.com
State Accepted
Headers show
Series ci/test-configs.sh: use nproc | expand

Commit Message

Michael Adler March 18, 2022, 3:12 p.m. UTC
Use `nproc` instead of hard-coding the number of available processing
units. Also, while we're at it, do not rely on shell expansion (aka
globbing) any more.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Michael Adler <michael.adler@siemens.com>
---
 ci/test-configs.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/ci/test-configs.sh b/ci/test-configs.sh
index 0bbd46b..3525520 100755
--- a/ci/test-configs.sh
+++ b/ci/test-configs.sh
@@ -10,9 +10,9 @@ 
 # SPDX-License-Identifier:	GPL-2.0-only
 set -eu
 
-for i in configs/*; do
-    echo "*** Testing config: $i"
-    make "$(basename $i)"
-    make -j8
+find configs -type f | while read -r fname; do
+    echo "*** Testing config: $fname"
+    make "$(basename "$fname")"
+    make "-j$(nproc)"
     make tests
 done