autotest/common: reorder generic stuff to the top of the file

Put it all together at the top of the file so that
the file is less chaotic overall.

Change-Id: Ia92511e590692bbe31d0f626e9542374eaaab442
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453871
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-05-09 10:14:21 +02:00 committed by Jim Harris
parent e20401c838
commit caa76c39f9

View File

@ -1,5 +1,6 @@
: ${SPDK_AUTOTEST_X=true}; export SPDK_AUTOTEST_X PS4=' \t \$ '
: ${SPDK_AUTOTEST_X=true}; export SPDK_AUTOTEST_X
if $SPDK_AUTOTEST_X; then if $SPDK_AUTOTEST_X; then
set -x set -x
fi fi
@ -28,11 +29,21 @@ function xtrace_restore() {
set -e set -e
if [ "$(uname -s)" = "Linux" ]; then
# Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages.
export HUGEMEM=8192
elif [ "$(uname -s)" = "FreeBSD" ]; then
# FreeBSD runs a much more limited set of tests, so keep the default 2GB.
export HUGEMEM=2048
else
echo "Unknown OS \"$(uname -s)\""
exit 1
fi
# Export flag to skip the known bug that exists in librados # Export flag to skip the known bug that exists in librados
# Bug is reported on ceph bug tracker with number 24078 # Bug is reported on ceph bug tracker with number 24078
export ASAN_OPTIONS=new_delete_type_mismatch=0 export ASAN_OPTIONS=new_delete_type_mismatch=0
export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'
PS4=' \t \$ '
: ${RUN_NIGHTLY:=0} : ${RUN_NIGHTLY:=0}
export RUN_NIGHTLY export RUN_NIGHTLY
@ -86,10 +97,6 @@ else
export DEPENDENCY_DIR export DEPENDENCY_DIR
fi fi
if [ ! -z "$HUGEMEM" ]; then
export HUGEMEM
fi
# pass our valgrind desire on to unittest.sh # pass our valgrind desire on to unittest.sh
if [ $SPDK_RUN_VALGRIND -eq 0 ]; then if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
export valgrind='' export valgrind=''
@ -118,15 +125,6 @@ if [ $SPDK_RUN_ASAN -eq 1 ]; then
config_params+=' --enable-asan' config_params+=' --enable-asan'
fi fi
export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'
# On Linux systems, override the default HUGEMEM in scripts/setup.sh to
# allocate 8GB in hugepages.
# FreeBSD runs a much more limited set of tests, so keep the default 2GB.
if [ `uname -s` = "Linux" ]; then
export HUGEMEM=8192
fi
DEFAULT_RPC_ADDR=/var/tmp/spdk.sock DEFAULT_RPC_ADDR=/var/tmp/spdk.sock
case `uname` in case `uname` in
@ -147,10 +145,6 @@ case `uname` in
MAKEFLAGS=${MAKEFLAGS:--j$(nproc)} MAKEFLAGS=${MAKEFLAGS:--j$(nproc)}
config_params+=' --enable-coverage' config_params+=' --enable-coverage'
;; ;;
*)
echo "Unknown OS in $0"
exit 1
;;
esac esac
# By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule. # By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule.