test/vhost: change the common.sh position in readonly.sh

vhost nightly readonly issue
get_vhost_dir function in the common.sh script.

Change-Id: Ic2ceee4cf8d8486715b908791d79e421269742bf
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/401100
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Chen Wang 2018-02-23 14:43:28 +08:00 committed by Jim Harris
parent 2939b715d0
commit 05db56d7d8

View File

@ -4,6 +4,7 @@ set -e
BASE_DIR=$(readlink -f $(dirname $0))
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $BASE_DIR/../../../../ && pwd)"
[[ -z "$COMMON_DIR" ]] && COMMON_DIR="$(cd $BASE_DIR/../common && pwd)"
source $COMMON_DIR/common.sh
rpc_py="$BASE_DIR/../../../scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
@ -44,7 +45,6 @@ while getopts 'xh-:' optchar; do
esac
done
. $COMMON_DIR/common.sh
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
if [[ $EUID -ne 0 ]]; then