summaryrefslogtreecommitdiff
path: root/TestScripts
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-10-13 06:26:18 -0400
committerJeffrey Walton <noloader@gmail.com>2019-10-13 06:26:18 -0400
commit49f652298b3dc4191f6f652d9999648d156a4859 (patch)
tree903bad8882230b734b7293cabbbba145477d265a /TestScripts
parentd3bb20ffe06190485c2e6d8207c33670808a8f08 (diff)
downloadcryptopp-git-49f652298b3dc4191f6f652d9999648d156a4859.tar.gz
Update cryptest.sh for OS X 10.9
Diffstat (limited to 'TestScripts')
-rwxr-xr-xTestScripts/cryptest.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh
index 381c70e7..37aa027b 100755
--- a/TestScripts/cryptest.sh
+++ b/TestScripts/cryptest.sh
@@ -925,6 +925,12 @@ elif [[ (-e "/proc/cpuinfo") && (-e "/proc/meminfo") ]]; then
elif [[ "$IS_DARWIN" -ne 0 ]]; then
CPU_COUNT="$(sysctl -a 2>&1 | $GREP "hw.availcpu" | $AWK '{print $3; exit}')"
MEM_SIZE="$(sysctl -a 2>&1 | $GREP "hw.memsize" | $AWK '{print int($3/1024/1024); exit;}')"
+ if [[ -z "$CPU_COUNT" ]]; then
+ CPU_COUNT="$(sysctl -a 2>&1 | $GREP "hw.activecpu" | $AWK '{print $2; exit}')"
+ fi
+ if [[ (-z "$MEM_SIZE") || ("$MEM_SIZE" -eq 0) ]]; then
+ MEM_SIZE="$(sysctl -a 2>&1 | $GREP "hw.memsize" | $AWK '{print int($2/1024/1024); exit;}')"
+ fi
elif [[ "$IS_SOLARIS" -ne 0 ]]; then
CPU_COUNT="$(psrinfo 2>/dev/null | wc -l | $AWK '{print $1}')"
MEM_SIZE="$(prtconf 2>/dev/null | $GREP "Memory" | $AWK '{print int($3)}')"
@@ -945,6 +951,10 @@ elif [[ (-e "/proc/cpuinfo") ]]; then
elif [[ "$IS_DARWIN" -ne 0 ]]; then
CPU_FREQ="$(sysctl -a 2>&1 | $GREP "hw.cpufrequency" | $AWK '{print ($3); exit;}')"
CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024/1024/1024}')"
+ if [[ (-z "$CPU_FREQ") || ("$CPU_FREQ" -eq 0) ]]; then
+ CPU_FREQ="$(sysctl -a 2>&1 | $GREP "hw.cpufrequency" | $AWK '{print ($2); exit;}')"
+ CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024/1024/1024}')"
+ fi
elif [[ "$IS_SOLARIS" -ne 0 ]]; then
CPU_FREQ="$(psrinfo -v 2>/dev/null | $GREP "MHz" | $AWK '{print $6; exit;}')"
CPU_FREQ="$(echo $CPU_FREQ | $AWK '{print $0/1024}')"