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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453875
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-05-09 12:50:26 +02:00 committed by Jim Harris
parent 3bf4c60608
commit 7612ac476e

View File

@ -1,10 +1,3 @@
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