aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Golin <rengolin@gmail.com>2016-06-08 12:29:54 +0100
committerRenato Golin <rengolin@gmail.com>2016-06-08 12:29:54 +0100
commit673e982ecaba37d8af27b17b2bbaa5b67dc80868 (patch)
treecaaba895c0851f4b507474f184ee5aadf886ccfe
parent9421b237fd0aa1d3632fcee417efa114a844f78e (diff)
downloadlinaro-scripts-673e982ecaba37d8af27b17b2bbaa5b67dc80868.tar.gz
[release] Add -jN to test-release.sh
Adding the number of cores to the -j option for test-release. Also, fix a bunch of shellcheck warnings. Change-Id: I54ee89534de265e764e95f5ebf094fc6cd1922c2
-rwxr-xr-xrelease/run.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/release/run.sh b/release/run.sh
index 5672fa1..342e3e5 100755
--- a/release/run.sh
+++ b/release/run.sh
@@ -3,34 +3,35 @@
syntax="Syntax: $0 REL RC"
if [[ $1 = '' ]]; then
- echo $syntax
+ echo "$syntax"
exit 1
fi
-REL=$1
+REL="$1"
shift
if [[ $1 = 'final' ]]; then
RC="-final"
-else if [[ $1 != '' ]]; then
+elif [[ $1 != '' ]]; then
RC="-rc $1"
else
echo "Syntax: $0 REL RC"
exit 1
-fi fi
+fi
-aarch64="`egrep '(AArch64|asimd)' /proc/cpuinfo`"
-armv7="`grep ARMv7 /proc/cpuinfo`"
-intel="`grep Intel /proc/cpuinfo`"
+aarch64=$(egrep '(AArch64|asimd)' /proc/cpuinfo)
+armv7=$(grep ARMv7 /proc/cpuinfo)
+intel=$(grep Intel /proc/cpuinfo)
+cores=$(grep -c processor /proc/cpuinfo)
if [[ $aarch64 = '' && $armv7 = '' && $intel = '' ]]; then
echo "This is neither of ARMv7, AArch64, Intel"
exit 1
fi
-triple=armv7a-linux-gnueabihf
+triple="armv7a-linux-gnueabihf"
if [[ $aarch64 != '' ]]; then
- triple=aarch64-linux-gnu
+ triple="aarch64-linux-gnu"
fi
if [[ $intel != '' ]]; then
- triple=x86_64-linux-gnu
+ triple="x86_64-linux-gnu"
fi
-./test-release.sh -release $REL $RC -triple $triple -j8 -no-libs -no-test-suite
+./test-release.sh -release $REL $RC -triple $triple -j$cores -no-libs -no-test-suite