Travis build fixes
cover Travis build fixes
Hi,
FYI only first commit is required to fix travis failures.
Kind regards,
Petr
Petr Vorel (2):
docparse/parse.sh: Fix parsing on dash docparse/parse.sh: Fix running with relative path
docparse/parse.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.29.2
PATCH 1/2 docparse/parse.sh: Fix parsing on dash
bash keeps escape sequences (e.g. \t and \n) when using echo:
$ a="-v\tverbose output\n"; echo "$a" -v\tverbose output\n $
But dash interprets them (behaves like echo -e on bash):
$ a="-v\tverbose output\n"; echo -e "$a" -e -v verbose output
$
Using printf does not help, because it'd have to be separated with -- which cannot be used for printing variables.
Fortunately cat << EOF redirection is portable.
In the future we should probably avoid shell as much as possible.
--- docparse/parse.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
docparse/parse.sh +3 -1
@@ -32,7 +32,9 @@ for test in `find testcases/ -name '*.c'`; do echo ',' fi first= - echo -n "$a" + cat <<EOF +$a +EOF fi done
Signature · 1 line
2.29.2
PATCH 1/2 docparse/parse.sh: Fix parsing on dash
Hi!
Quoted 10 lines
bash keeps escape sequences (e.g. \t and \n) when using echo:
$ a="-v\tverbose output\n"; echo "$a" -v\tverbose output\n $But dash interprets them (behaves like echo -e on bash):
$ a="-v\tverbose output\n"; echo -e "$a" -e -v verbose output
Can we remove the \t from the perf_event_open02.c as well please? I doubt that it will do any good when we pass the strings into asciidoc parser...
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/2 docparse/parse.sh: Fix parsing on dash
Quoted 7 lines
Hi!
Quoted 5 lines
bash keeps escape sequences (e.g. \t and \n) when using echo:
$ a="-v\tverbose output\n"; echo "$a" -v\tverbose output\n $
Quoted 6 lines
Quoted 4 lines
But dash interprets them (behaves like echo -e on bash):
$ a="-v\tverbose output\n"; echo -e "$a" -e -v verbose outputReviewed-by Cyril Hrubis <[email protected]>
Thanks for both reviews!
Quoted 3 lines
Can we remove the \t from the
perf_event_open02.cas well please? I doubt that it will do any good when we pass the strings into asciidoc parser...
Sure, I'll replace it with <tab>.
Kind regards,
Petr
PATCH 1/2 docparse/parse.sh: Fix parsing on dash
In reply to Cyril HrubisQuoted 1 line
Reviewed-by Cyril Hrubis <[email protected]>
Both patches merged, thanks!
Kind regards,
Petr
PATCH 2/2 docparse/parse.sh: Fix running with relative path
In reply to Petr Vorelthat'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.
--- docparse/parse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docparse/parse.sh +1 -1
@@ -5,7 +5,7 @@ set -e top_builddir=$PWD/.. -top_srcdir="$(dirname $0)/.." +top_srcdir="$(cd $(dirname $0)/..; pwd)" cd $top_srcdir
Signature · 1 line
2.29.2
PATCH 2/2 docparse/parse.sh: Fix running with relative path
Hi!
Quoted 19 lines
that's not needed for build, but useful for debugging.
Running as ./parse.sh fails:
cat: ./../VERSION: No such file or directory
top_srcdirmust be absolute path.Fixes a069cd36b ("docparse: Add test documentation parser")Signed-off-by Petr Vorel <[email protected]>--- docparse/parse.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docparse/parse.sh +0
-0
docparse/parse.sh line 10
Quoted 7 lines
docparse/parse.sh +1
-1@@ -5,7 +5,7 @@ set -e top_builddir=$PWD/.. -top_srcdir="$(dirname $0)/.." +top_srcdir="$(cd $(dirname $0)/..; pwd)" cd $top_srcdir
Signature · 2 lines
Cyril Hrubis [email protected]