From 5bbac65d549e359732cd9307ea09ffe5efb309af Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 1 May 2017 17:34:15 -0700 Subject: [PATCH] autorun: make config setup common to all scripts Change-Id: I0e497953164012ea2887f3bf1f4d91b783d6b6e5 Signed-off-by: Daniel Verkamp --- autorun.sh | 8 +++++--- autotest.sh | 17 ----------------- scripts/autotest_common.sh | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/autorun.sh b/autorun.sh index 18dad4f55e..5fd13ad9c9 100755 --- a/autorun.sh +++ b/autorun.sh @@ -4,7 +4,9 @@ set -e rootdir=$(readlink -f $(dirname $0)) +conf=~/autorun-spdk.conf + # Runs agent scripts -$rootdir/autobuild.sh -sudo $rootdir/autotest.sh ~/autorun-spdk.conf -$rootdir/autopackage.sh +$rootdir/autobuild.sh "$conf" +sudo $rootdir/autotest.sh "$conf" +$rootdir/autopackage.sh "$conf" diff --git a/autotest.sh b/autotest.sh index 975f69ff6e..410487ab49 100755 --- a/autotest.sh +++ b/autotest.sh @@ -1,22 +1,5 @@ #!/usr/bin/env bash -if [[ ! -z $1 ]]; then - if [ -f $1 ]; then - source $1 - fi -fi - -# Set defaults for missing test config options -: ${SPDK_TEST_ISCSI=1}; export SPDK_TEST_ISCSI -: ${SPDK_TEST_NVME=1}; export SPDK_TEST_NVME -: ${SPDK_TEST_NVMF=1}; export SPDK_TEST_NVMF -: ${SPDK_TEST_VHOST=1}; export SPDK_TEST_VHOST -: ${SPDK_TEST_BLOCKDEV=1}; export SPDK_TEST_BLOCKDEV -: ${SPDK_TEST_IOAT=1}; export SPDK_TEST_IOAT -: ${SPDK_TEST_EVENT=1}; export SPDK_TEST_EVENT -: ${SPDK_TEST_BLOBFS=1}; export SPDK_TEST_BLOBFS - - rootdir=$(readlink -f $(dirname $0)) source "$rootdir/scripts/autotest_common.sh" source "$rootdir/test/nvmf/common.sh" diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 114388955d..3269c9f108 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -3,6 +3,22 @@ ulimit -c unlimited export RUN_NIGHTLY=0 +if [[ ! -z $1 ]]; then + if [ -f $1 ]; then + source $1 + fi +fi + +# Set defaults for missing test config options +: ${SPDK_TEST_ISCSI=1}; export SPDK_TEST_ISCSI +: ${SPDK_TEST_NVME=1}; export SPDK_TEST_NVME +: ${SPDK_TEST_NVMF=1}; export SPDK_TEST_NVMF +: ${SPDK_TEST_VHOST=1}; export SPDK_TEST_VHOST +: ${SPDK_TEST_BLOCKDEV=1}; export SPDK_TEST_BLOCKDEV +: ${SPDK_TEST_IOAT=1}; export SPDK_TEST_IOAT +: ${SPDK_TEST_EVENT=1}; export SPDK_TEST_EVENT +: ${SPDK_TEST_BLOBFS=1}; export SPDK_TEST_BLOBFS + config_params='--enable-debug --enable-werror' export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'