#!/bin/bash
###SHELLPACK preamble stressng-install V0.13.03
GIT_LOCATION=https://github.com/ColinIanKing/stress-ng
MIRROR_LOCATION="$WEBROOT/extra/stressng/"

###SHELLPACK parseargBegin
###SHELLPACK parseargEnd

###SHELLPACK git_fetch stressng-${VERSION}.tar.gz stressng-${VERSION}-installed

###SHELLPACK build_start stressng-${VERSION}-installed
echo Disabling getpriority in stress-get.c. The syscall takes a global
echo rwlock which ends up dominating the overall test in terms of
echo throughput
sed -i -e 's/HAVE_GETPRIORITY/DISABLE_GETPRIORITY/' stress-get.c
sed -i -e 's/HAVE_PRLIMIT/DISABLE_HAVE_PRLIMIT/' stress-get.c
sed -i -e 's/ret = getrlimit.*/ret = 0;/' stress-get.c
sed -i -e 's/__NR_sysfs/__DISABLE_sysfs/' core-shim.c
###SHELLPACK make

echo stressng installed successfully
