test/vhost: remove COMMON_DIR from common.sh

Change-Id: Id6bb86151ec3a90298c135acb45c5cc259975348
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387799
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Pawel Wodkowski 2017-11-16 15:46:44 +01:00 committed by Daniel Verkamp
parent 63c1c9d510
commit 2bbe6a8021
2 changed files with 8 additions and 15 deletions

View File

@ -5,7 +5,6 @@ BASE_DIR=$(readlink -f $(dirname $0))
# Default running dir -> spdk/..
[[ -z "$TEST_DIR" ]] && TEST_DIR=$BASE_DIR/../../../../
COMMON_DIR="$(cd $BASE_DIR/../common && pwd)"
TEST_DIR="$(mkdir -p $TEST_DIR && cd $TEST_DIR && echo $PWD)"
SPDK_BUILD_DIR=$BASE_DIR/../../../
@ -26,7 +25,10 @@ INSTALL_DIR="$TEST_DIR/root"
mkdir -p $TEST_DIR
. $COMMON_DIR/autotest.config
#
# Source config describing QEMU and VHOST cores and NUMA
#
source $(readlink -f $(dirname ${BASH_SOURCE[0]}))/autotest.config
# Trace flag is optional, if it wasn't set earlier - disable it after sourcing
# autotest_common.sh
@ -71,7 +73,7 @@ function spdk_vhost_run()
fi
cp $vhost_conf_template $vhost_conf_file
$BASE_DIR/../../../scripts/gen_nvme.sh >> $vhost_conf_file
$SPDK_BUILD_DIR/scripts/gen_nvme.sh >> $vhost_conf_file
local cmd="$vhost_app -m $vhost_reactor_mask -p $vhost_master_core -c $vhost_conf_file"

View File

@ -80,19 +80,11 @@ is lower than number of requested disks for test ($max_disks)"
fi
if $distribute_cores; then
cp $COMMON_DIR/autotest.config $COMMON_DIR/autotest.config.bak
cp $BASE_DIR/autotest.config $COMMON_DIR/autotest.config
. $COMMON_DIR/common.sh
# FIXME: this need to be handled entirely in common.sh
source $BASE_DIR/autotest.config
fi
function restore_acfg()
{
if $distribute_cores; then
mv $COMMON_DIR/autotest.config.bak $COMMON_DIR/autotest.config
fi
}
trap 'restore_acfg; error_exit "${FUNCNAME}" "${LINENO}"' ERR
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
vm_kill_all
@ -288,4 +280,3 @@ $rpc_py get_luns
echo "INFO: Shutting down SPDK vhost app..."
spdk_vhost_kill
restore_acfg