test/config_converter: Declare $rootdir, $testdir paths

Make sure that $rootdir and $testdir are accessible in the sourced
environment. This is to follow the convention seen throughout the
entire repo and make sure that nothing that depends on these paths
fails in case they are missing.

Change-Id: Ie20754fc7aca7aab3636cb022499e9ff2f2dd30b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Michal Berger 2020-02-11 16:11:57 +01:00 committed by Tomasz Zawadzki
parent acc88da2c5
commit dfe17a39e8

View File

@ -1,7 +1,10 @@
#!/usr/bin/env bash
CONVERTER_DIR=$(readlink -f $(dirname $0))
SPDK_BUILD_DIR=$CONVERTER_DIR/../../
source $CONVERTER_DIR/../common/autotest_common.sh
testdir=$(readlink -f "$(dirname "$0")")
rootdir=$(readlink -f "$testdir/../../")
source "$rootdir/test/common/autotest_common.sh"
CONVERTER_DIR=$testdir
SPDK_BUILD_DIR=$rootdir
function test_cleanup() {
rm -f $CONVERTER_DIR/config_converter.json $CONVERTER_DIR/config_virtio_converter.json