Commit 7612ac47 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Jim Harris
Browse files

autotest/common: disable xtrace for the autotest_common.sh itself



Most of our test scripts source autotest_common.sh at the
very top of the file, and - since autotest_common.sh
enables xtraces inside - the first thing we'll see in test
output are likely xtraces from sourcing the configuration
file and setting up $config_params. Even a simplest test
script will produce a ton of output this way, making the
entire output unreadable. This is especially annoying when
the test script is run manually, so we get rid of it now.

All the SPDK autotest options and $config_params will be
printed elsewhere anyway.

Change-Id: I6d9c8e8ba261b632ffbb7d6d26d84eb7ccfb2ed8
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453875


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 3bf4c606
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
PS4=' \t	\$ '

: ${SPDK_AUTOTEST_X=true}; export SPDK_AUTOTEST_X
if $SPDK_AUTOTEST_X; then
	set -x
fi

function xtrace_disable() {
	PREV_BASH_OPTS="$-"
	set +x
@@ -27,6 +20,7 @@ function xtrace_restore() {
	xtrace_enable
}

xtrace_disable
set -e

if [ "$(uname -s)" = "Linux" ]; then
@@ -104,6 +98,7 @@ fi
: ${SPDK_TEST_BDEV_FTL=0}; export SPDK_TEST_BDEV_FTL
: ${SPDK_TEST_OCF=0}; export SPDK_TEST_OCF
: ${SPDK_TEST_FTL_EXTENDED=0}; export SPDK_TEST_FTL_EXTENDED
: ${SPDK_AUTOTEST_X=true}; export SPDK_AUTOTEST_X

if [ -z "$DEPENDENCY_DIR" ]; then
	export DEPENDENCY_DIR=/home/sys_sgsw
@@ -778,3 +773,12 @@ function freebsd_update_contigmem_mod()

set -o errtrace
trap "trap - ERR; print_backtrace >&2" ERR

PS4=' \t	\$ '
if $SPDK_AUTOTEST_X; then
	# explicitly enable xtraces
	set -x
	xtrace_enable
else
	xtrace_restore
fi