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 <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/383801 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
8bfcbf0c8a
commit
a30865f142
@ -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" | \
|
||||
|
Loading…
Reference in New Issue
Block a user