From 9378515eee2707c4579c758ed58dc44cfb5ef492 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Tue, 20 Jul 2021 10:31:08 +0200 Subject: [PATCH] autotest: Include only parent dir of the source in PS4 Previous expansion was assuming there's only one instance of "test/" string in source's path but this is not really the case on phy systems running in the CI. Instead of relaying on the string pattern of the path, simply disect it into basename_dir/source. So e.g.: /home/vagrant/spdk_repo/spdk/autobuild.sh -> spdk/autobuild.sh /home/vagrant/spdk_repo/spdk/test/nvmf/common.sh -> nvmf/common.sh Signed-off-by: Michal Berger Change-Id: I6f458566547dcaf5508263b2b19f4e1bc0de4f32 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8836 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Karol Latecki --- test/common/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index c4ed486aa..2ea1c8383 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -1405,7 +1405,7 @@ set -o errtrace shopt -s extdebug trap "trap - ERR; print_backtrace >&2" ERR -PS4=' \t -- ${BASH_SOURCE#*test/}@${LINENO} -- \$ ' +PS4=' \t -- ${BASH_SOURCE#${BASH_SOURCE%/*/*}/}@${LINENO} -- \$ ' if $SPDK_AUTOTEST_X; then # explicitly enable xtraces, overriding any tracking information. unset XTRACE_DISABLED