[LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path

Petr Vorel pvorel@suse.cz
Thu Dec 17 13:15:20 CET 2020


that's not needed for build, but useful for debugging.

Running as ./parse.sh fails:
cat: ./../VERSION: No such file or directory

top_srcdir must be absolute path.

Fixes: a069cd36b ("docparse: Add test documentation parser")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 docparse/parse.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docparse/parse.sh b/docparse/parse.sh
index 172eab702..79011bc10 100755
--- a/docparse/parse.sh
+++ b/docparse/parse.sh
@@ -5,7 +5,7 @@
 set -e
 
 top_builddir=$PWD/..
-top_srcdir="$(dirname $0)/.."
+top_srcdir="$(cd $(dirname $0)/..; pwd)"
 
 cd $top_srcdir
 
-- 
2.29.2



More information about the ltp mailing list