From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 437951F567 for ; Sat, 9 Sep 2023 12:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1694260903; bh=eVOabYFiDCljTs0gHjREPH0YtMLLQ+VcDTo4QbUpBOg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kuFroDBRhm0FOTjuVK9qi8h6xVRHkVWoONZ8yo1BequT4kS6oE2aB2N8PCplwUUzl y+kCpJTqmcGFy3Wi/nyh8fXIhu2kFMZlJ+/PnLWLMOdK+/fp4Gk8qNIQC0R3HAUX7a z+icciqW1Ipw3UmUitiff2hVD8+4XIeEHPBiWC4M= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/8] ci/run.sh: parameterize BUILD_JOBS TEST_JOBS and TEST_TARGET Date: Sat, 9 Sep 2023 12:01:37 +0000 Message-ID: <20230909120142.1041752-4-e@80x24.org> In-Reply-To: <20230909120142.1041752-1-e@80x24.org> References: <20230909120142.1041752-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Parallezing BUILD_JOBS is usually harmless, but TEST_JOBS can be problematic when tracking down problems on new platforms. TEST_TARGET can be `check' or `check-run' for performance. --- ci/run.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index 9613943b..1faf92c2 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2019-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ set -e SUDO=${SUDO-'sudo'} PERL=${PERL-'perl'} MAKE=${MAKE-'make'} @@ -8,14 +8,16 @@ DO=${DO-''} set -x if test -f Makefile then - $DO $MAKE clean + $DO $MAKE clean >/dev/null fi +NPROC=${NPROC-$({ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN || + gnproc || nproc || echo 2; } 2>/dev/null)} ./ci/profiles.sh | while read args do $DO $SUDO $PERL -w ci/deps.perl $args $DO $PERL Makefile.PL - $DO $MAKE - $DO $MAKE check - $DO $MAKE clean + $DO $MAKE -j${BUILD_JOBS-$NPROC} + $DO $MAKE -j${TEST_JOBS-1} ${TEST_TARGET-test} + $DO $MAKE clean >/dev/null done