From dfe17a39e8a0058addaa408d4e83c39d94284244 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Tue, 11 Feb 2020 16:11:57 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/777 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- test/config_converter/test_converter.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/config_converter/test_converter.sh b/test/config_converter/test_converter.sh index 7e241e38c..1b3279a85 100755 --- a/test/config_converter/test_converter.sh +++ b/test/config_converter/test_converter.sh @@ -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