projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port: Detect nproc bin name in benchmark scripts
[urcu.git]
/
tests
/
benchmark
/
run-urcu-tests.sh
diff --git
a/tests/benchmark/run-urcu-tests.sh
b/tests/benchmark/run-urcu-tests.sh
index 6e6cf606f81f158588d4b5fdd41415cf13bf6aa0..7a0974207c75b42a0a45cb800e6271f8df899b3f 100755
(executable)
--- a/
tests/benchmark/run-urcu-tests.sh
+++ b/
tests/benchmark/run-urcu-tests.sh
@@
-9,8
+9,17
@@
plan_tests ${NUM_TESTS}
#run all tests
diag "Executing URCU tests"
#run all tests
diag "Executing URCU tests"
+NUM_CPUS="1"
+for i in nproc gnproc; do
+ NUM_CPUS=$($i 2>/dev/null)
+ if [ "$?" -eq "0" ]; then
+ break
+ else
+ NUM_CPUS="1"
+ fi
+done
+
#set to number of active CPUS
#set to number of active CPUS
-NUM_CPUS=$(nproc)
if [[ ${NUM_CPUS} -lt 4 ]]; then
NUM_CPUS=4 # Floor at 4 due to following assumptions.
fi
if [[ ${NUM_CPUS} -lt 4 ]]; then
NUM_CPUS=4 # Floor at 4 due to following assumptions.
fi
This page took
0.022768 seconds
and
4
git commands to generate.