diff options
author | Chase Qi <chase.qi@linaro.org> | 2017-06-02 11:39:11 +0800 |
---|---|---|
committer | Chase Qi <chase.qi@linaro.org> | 2017-06-02 11:39:11 +0800 |
commit | 8ef4973094f6c9b3f0c9923fc8b9124032082fb5 (patch) | |
tree | b8407dcd44d0e23f3ae6630716a7691a7721501b /automated | |
parent | dff37392dcc3466ef91c2a7be47754197a351aa8 (diff) |
linux: sysbench: cope with shellcheck
Change-Id: I43f893dafb9f0d7c245d2a6a9d76b20c2df0d394
Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-x | automated/linux/sysbench/sysbench.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/automated/linux/sysbench/sysbench.sh b/automated/linux/sysbench/sysbench.sh index a818ae8..4545af9 100755 --- a/automated/linux/sysbench/sysbench.sh +++ b/automated/linux/sysbench/sysbench.sh @@ -92,6 +92,7 @@ sysbench --version general_parser() { # if $1 is there, let's append to test name in the result file + # shellcheck disable=SC2039 local tc="$tc$1" ms=$(grep -m 1 "total time" "${logfile}" | awk '{print substr($NF,1,length($NF)-1)}') add_metric "${tc}-total-time" "pass" "${ms}" "s" @@ -127,9 +128,10 @@ for tc in ${TESTS}; do logfile="${OUTPUT}/sysbench-${tc}.txt" case "${tc}" in percpu) - for i in $(cat /proc/cpuinfo | awk '/^processor/{print $3}'); do - taskset -c $i sysbench --num-threads=1 --test=cpu run | tee "${logfile}" - general_parser $i + processor_id="$(awk '/^processor/{print $3}' /proc/cpuinfo)" + for i in ${processor_id}; do + taskset -c "$i" sysbench --num-threads=1 --test=cpu run | tee "${logfile}" + general_parser "$i" done ;; cpu|threads|mutex) |