master - tests: stacktrace understands fullpath
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c6bcfcba8541d053f142496c30f437a694daf5ee Commit: c6bcfcba8541d053f142496c30f437a694daf5ee Parent: c969e05aabb00b400d24e44c09c720f1cdebb351 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Apr 14 09:48:57 2015 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Apr 14 10:11:36 2015 +0200
tests: stacktrace understands fullpath
$0 as name of script could be either relative or full path. When it's fullpath don't prepend $TESTOLDPWD.
--- test/lib/utils.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
test/lib/utils.sh +3 -1
@@ -166,7 +166,9 @@ STACKTRACE() { udevadm info --path "$i" || true done | sed -e "s,^,## UDEV: ," echo "<======== Script file \"$(< TESTNAME)\" ========>" - awk '{print "## Line:", NR, "\t", $0}' "$TESTOLDPWD/$0" + local script=$0 + test -f "$script" || script="$TESTOLDPWD/$0" + awk '{print "## Line:", NR, "\t", $0}' "$script" } test -f SKIP_THIS_TEST && exit 200