Fix Linux swap detection for non-X86 environments
parent
054edb6c38
commit
6c4c0db3de
10
cryptest.sh
10
cryptest.sh
|
|
@ -203,9 +203,13 @@ fi
|
||||||
# Some ARM devboards cannot use 'make -j N', even with multiple cores and RAM
|
# Some ARM devboards cannot use 'make -j N', even with multiple cores and RAM
|
||||||
# An 8-core Cubietruck Plus with 2GB RAM experiences OOM kills with '-j 2'.
|
# An 8-core Cubietruck Plus with 2GB RAM experiences OOM kills with '-j 2'.
|
||||||
HAVE_SWAP=1
|
HAVE_SWAP=1
|
||||||
if [ "$IS_ARM" -ne "0" ]; then
|
if [ "$IS_LINUX" -ne "0" ]; then
|
||||||
SWAP_SIZE=$(cat /proc/meminfo | grep "SwapTotal" | awk '{print $2}')
|
if [ -e "/proc/meminfo" ]; then
|
||||||
if [ "$SWAP_SIZE" -eq "0" ]; then
|
SWAP_SIZE=$(cat /proc/meminfo | grep "SwapTotal" | awk '{print $2}')
|
||||||
|
if [ "$SWAP_SIZE" -eq "0" ]; then
|
||||||
|
HAVE_SWAP=0
|
||||||
|
fi
|
||||||
|
else
|
||||||
HAVE_SWAP=0
|
HAVE_SWAP=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue