This is an automated email from the ASF dual-hosted git repository. bnolsen pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push: new c2d78d0 ensure all scripts use bash, make nproc more cross platform (#323) c2d78d0 is described below commit c2d78d0b02fb0750b45f762ea2bd7b2c866306b2 Author: Brian Olsen <bnol...@gmail.com> AuthorDate: Mon Mar 11 06:20:44 2024 -0600 ensure all scripts use bash, make nproc more cross platform (#323) --- jenkins/bin/autest.sh | 4 ++-- jenkins/bin/autotools.sh | 2 +- jenkins/bin/cache-tests.sh | 2 +- jenkins/bin/clang-analyzer.sh | 4 ++-- jenkins/bin/cleanup.sh | 2 +- jenkins/bin/cmake.sh | 4 ++-- jenkins/bin/cmake_basic.sh | 4 ++-- jenkins/bin/coverity.sh | 4 ++-- jenkins/bin/docs.sh | 4 ++-- jenkins/bin/environment.sh | 4 ++-- jenkins/bin/extract.sh | 2 +- jenkins/bin/format.sh | 4 ++-- jenkins/bin/gh-mirror.sh | 2 +- jenkins/bin/github.sh | 2 +- jenkins/bin/in_tree.sh | 2 +- jenkins/bin/out_of_tree.sh | 2 +- jenkins/bin/quiche.sh | 4 ++-- jenkins/bin/rat.sh | 2 +- jenkins/bin/regression.sh | 10 +++++----- jenkins/bin/snapshot.sh | 2 +- 20 files changed, 33 insertions(+), 33 deletions(-) diff --git a/jenkins/bin/autest.sh b/jenkins/bin/autest.sh index f684a0f..389ecf7 100755 --- a/jenkins/bin/autest.sh +++ b/jenkins/bin/autest.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -21,7 +21,7 @@ set +x cd src #sleep 30 -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} git branch --contains ${ghprbActualCommit} > /dev/null if [ $? = 0 -a ! -z "$ghprbActualCommit" ]; then diff --git a/jenkins/bin/autotools.sh b/jenkins/bin/autotools.sh index 6f31766..974a5b5 100755 --- a/jenkins/bin/autotools.sh +++ b/jenkins/bin/autotools.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/cache-tests.sh b/jenkins/bin/cache-tests.sh index 21771f9..3d39b19 100755 --- a/jenkins/bin/cache-tests.sh +++ b/jenkins/bin/cache-tests.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/clang-analyzer.sh b/jenkins/bin/clang-analyzer.sh index 8827ee0..30bcb9b 100755 --- a/jenkins/bin/clang-analyzer.sh +++ b/jenkins/bin/clang-analyzer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -21,7 +21,7 @@ set -e grep -q 80010 configure.ac && echo "8.1.x branch detected, stop here!" && exit 0 -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} WORKSPACE="${WORKSPACE:-..}" GITHUB_BRANCH="${GITHUB_BRANCH:-master}" diff --git a/jenkins/bin/cleanup.sh b/jenkins/bin/cleanup.sh index 39c3de0..4c64334 100755 --- a/jenkins/bin/cleanup.sh +++ b/jenkins/bin/cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/cmake.sh b/jenkins/bin/cmake.sh index c3f69cc..82f9c49 100755 --- a/jenkins/bin/cmake.sh +++ b/jenkins/bin/cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -21,7 +21,7 @@ set -x set -e -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} if [ ! -d cmake ] then diff --git a/jenkins/bin/cmake_basic.sh b/jenkins/bin/cmake_basic.sh index 2d9e33b..d8e79b2 100755 --- a/jenkins/bin/cmake_basic.sh +++ b/jenkins/bin/cmake_basic.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -20,7 +20,7 @@ set -x -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} if [ ! -d cmake ] then diff --git a/jenkins/bin/coverity.sh b/jenkins/bin/coverity.sh index dbfb222..67501e8 100755 --- a/jenkins/bin/coverity.sh +++ b/jenkins/bin/coverity.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ cd "${WORKSPACE}/src" -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} # Get the Coverity tools into our path source /opt/rh/devtoolset-7/enable diff --git a/jenkins/bin/docs.sh b/jenkins/bin/docs.sh index 3a107c5..c2c292c 100755 --- a/jenkins/bin/docs.sh +++ b/jenkins/bin/docs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ set -x -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} # These shenanigans are here to allow it to run both manually, and via Jenkins test -z "${ATS_MAKE}" && ATS_MAKE="make" diff --git a/jenkins/bin/environment.sh b/jenkins/bin/environment.sh index 3b644d4..271301a 100755 --- a/jenkins/bin/environment.sh +++ b/jenkins/bin/environment.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -20,7 +20,7 @@ set -x [[ ":$PATH:" != *":/opt/bin:"* ]] && export PATH="/opt/bin:${PATH}" -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} # Show which platform we're actually building on diff --git a/jenkins/bin/extract.sh b/jenkins/bin/extract.sh index 5c498a3..6292467 100755 --- a/jenkins/bin/extract.sh +++ b/jenkins/bin/extract.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/format.sh b/jenkins/bin/format.sh index 0aef7f4..6f148bd 100755 --- a/jenkins/bin/format.sh +++ b/jenkins/bin/format.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -43,7 +43,7 @@ echo "Success! No DOS carriage return" set -x -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} if [ -d cmake ] then diff --git a/jenkins/bin/gh-mirror.sh b/jenkins/bin/gh-mirror.sh index 9bf2e3e..5503961 100755 --- a/jenkins/bin/gh-mirror.sh +++ b/jenkins/bin/gh-mirror.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/github.sh b/jenkins/bin/github.sh index 054d98e..ac791ad 100755 --- a/jenkins/bin/github.sh +++ b/jenkins/bin/github.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/in_tree.sh b/jenkins/bin/in_tree.sh index 77ad498..74b1993 100755 --- a/jenkins/bin/in_tree.sh +++ b/jenkins/bin/in_tree.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/out_of_tree.sh b/jenkins/bin/out_of_tree.sh index 5c611b1..a9cc7b7 100755 --- a/jenkins/bin/out_of_tree.sh +++ b/jenkins/bin/out_of_tree.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/quiche.sh b/jenkins/bin/quiche.sh index 2a5fa60..6560786 100755 --- a/jenkins/bin/quiche.sh +++ b/jenkins/bin/quiche.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -20,7 +20,7 @@ set -x -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} if [ ! -d cmake ] then diff --git a/jenkins/bin/rat.sh b/jenkins/bin/rat.sh index d84c3c3..0e8a7bc 100755 --- a/jenkins/bin/rat.sh +++ b/jenkins/bin/rat.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/jenkins/bin/regression.sh b/jenkins/bin/regression.sh index ba9213e..bc01738 100755 --- a/jenkins/bin/regression.sh +++ b/jenkins/bin/regression.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ set -x set -e -NPROC=$(nproc) +NPROC=${NPROC:-$(getconf _NPROCESSORS_ONLN)} #cd "${ATS_BUILD_BASEDIR}/build" #cd "${ATS_BUILD_BASEDIR}" @@ -33,9 +33,9 @@ echo -n "Unit tests started at " && date if [ -d cmake ] then - pushd build - ctest -B build -j${NPROC} --output-on-failure --no-compress-output -T Test - popd + pushd build + ctest -j${NPROC} --output-on-failure --no-compress-output -T Test + popd else ${ATS_MAKE} -j${NPROC} check VERBOSE=Y V=1 || exit 1 fi diff --git a/jenkins/bin/snapshot.sh b/jenkins/bin/snapshot.sh index 6315491..bf17f30 100755 --- a/jenkins/bin/snapshot.sh +++ b/jenkins/bin/snapshot.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file