diff options
Diffstat (limited to 'test/runtests')
-rwxr-xr-x | test/runtests | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/runtests b/test/runtests index 97528852..bd94ffc8 100755 --- a/test/runtests +++ b/test/runtests @@ -5,9 +5,14 @@ timed() { # Default to all .d direcories. - DIRS=$(find -type d -name '*.d' | sort) + DIRS=$(find . -type d -name '*.d' | sort) + + if [ -f /proc/cpuinfo ]; then + CORES=$(awk '/cpu cores/ { print $4; exit }' /proc/cpuinfo) + else + CORES=$(sysctl -n hw.physicalcpu) + fi - CORES=$(awk '/cpu cores/ { print $4; exit }' /proc/cpuinfo) if ! echo $CORES | grep -q '^[1-9][0-9]\?$'; then echo "warning: could not determine number of cores, using 2" |