diff options
author | umarcor <unai.martinezcorral@ehu.eus> | 2021-01-18 17:51:19 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-01-19 07:40:40 +0100 |
commit | b15ba54b9f1de3a5c71d3e221b2ced4c13916530 (patch) | |
tree | 54584b8b29c6f45621cf1437c079e6c354000e87 /testsuite/suite_driver.sh | |
parent | 58186fa3774292a384a1a2b57ce965fd0e947544 (diff) | |
download | ghdl-b15ba54b9f1de3a5c71d3e221b2ced4c13916530.tar.gz ghdl-b15ba54b9f1de3a5c71d3e221b2ced4c13916530.tar.bz2 ghdl-b15ba54b9f1de3a5c71d3e221b2ced4c13916530.zip |
testsuite: address bash linting issues
Diffstat (limited to 'testsuite/suite_driver.sh')
-rwxr-xr-x | testsuite/suite_driver.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/suite_driver.sh b/testsuite/suite_driver.sh index 748961634..66a584a86 100755 --- a/testsuite/suite_driver.sh +++ b/testsuite/suite_driver.sh @@ -22,13 +22,13 @@ full=n for opt; do case "$opt" in -k | --keep-going) full=y ;; - --dir=*) dirs=`echo $opt | sed -e 's/--dir=//'` ;; - --skip=*) d=`echo $opt | sed -e 's/--skip=//'` - dirs=`echo "" $dirs | sed -e "s/ $d//"` ;; - --start-at=*) d=`echo $opt | sed -e 's/--start-at=//'` - dirs=`echo "" $dirs | sed -e "s/^.* $d//"` + --dir=*) dirs="$(echo "$opt" | sed -e 's/--dir=//')" ;; + --skip=*) d="$(echo "$opt" | sed -e 's/--skip=//')" + dirs="$(echo "" "$dirs" | sed -e "s/ $d//")" ;; + --start-at=*) d="$(echo "$opt" | sed -e 's/--start-at=//')" + dirs="$(echo "" "$dirs" | sed -e "s/^.* $d//")" dirs="$d $dirs" ;; - --list-tests) echo $dirs; exit 0;; + --list-tests) echo "$dirs"; exit 0;; *) echo "Unknown option $opt" exit 2 ;; @@ -36,14 +36,14 @@ for opt; do done singlerun() { - cd $1 + cd "$1" if ./testsuite.sh > test.log 2>&1 ; then printf "$_suite $1: ${ANSI_GREEN}ok${ANSI_NOCOLOR}\n" # Don't disp log else printf "$_suite $1: ${ANSI_RED}failed${ANSI_NOCOLOR}\n" cat test.log - if [ $2 = "y" ]; then + if [ x"$2" = x"y" ]; then failures="$failures $1" else exit 1; @@ -52,7 +52,7 @@ singlerun() { cd .. } -for i in $dirs; do singlerun $i $full; done +for i in $dirs; do singlerun "$i" "$full"; done if [ x"$failures" = x"" ]; then echo "$_suite tests are successful" && exit 0 |