numam-spdk/autotest.sh
Daniel Verkamp 3e5fe6f602 autobuild: unbind NVMe devices on FreeBSD
Change-Id: I5e6a6ca6751d77aed48bedc2e59f97139dd8ef00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-10-09 10:03:25 -07:00

48 lines
762 B
Bash
Executable File

#!/usr/bin/env bash
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/autotest_common.sh"
set -xe
if [ $EUID -ne 0 ]; then
echo "$0 must be run as root"
exit 1
fi
trap "process_core; $rootdir/scripts/cleanup.sh; exit 1" SIGINT SIGTERM EXIT
timing_enter autotest
src=$(readlink -f $(dirname $0))
out=$PWD
cd $src
# set up huge pages
timing_enter afterboot
./scripts/configure_hugepages.sh 3072
timing_exit afterboot
./scripts/unbind_nvme.sh
#####################
# Unit Tests
#####################
timing_enter lib
time test/lib/nvme/nvme.sh
time test/lib/memory/memory.sh
timing_exit lib
./scripts/cleanup.sh
timing_exit autotest
chmod a+r $output_dir/timing.txt
trap - SIGINT SIGTERM EXIT
# catch any stray core files
process_core