From a30865f142b4ffcc5b837289aa9495a46d05d41a Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Wed, 25 Oct 2017 21:32:37 +0200 Subject: [PATCH] autotest_common.sh: use full file path in backtrace print If $rootdir is not set then '.' is prepended to the path of source file on stack frame. Use unmodified "${BASH_SOURCE[$i]}" to fix this. Change-Id: Ib927db9a4e56320fea73ca1b76b8f58730a9ae5f Signed-off-by: Pawel Wodkowski Reviewed-on: https://review.gerrithub.io/383801 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- scripts/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 850bb2afd..028fd9d79 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -302,7 +302,7 @@ function print_backtrace() { for i in $(seq 1 $((${#FUNCNAME[@]} - 1))); do local func="${FUNCNAME[$i]}" local line_nr="${BASH_LINENO[$((i - 1))]}" - local src="${BASH_SOURCE[$i]/#$rootdir/.}" + local src="${BASH_SOURCE[$i]}" echo "in $src:$line_nr -> $func()" echo " ..." nl -w 4 -ba -nln $src | grep -B 5 -A 5 "^$line_nr" | \