diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-03-14 20:30:57 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-03-14 20:30:57 +0100 |
commit | 173ec2e3096a6f7f5c9274d567c42511cf908386 (patch) | |
tree | b42e21ea53932b6653c164201b6b3c58db1de54b | |
parent | 854c10fe722401459e9c6a9d2bc4af7aefdfc6c8 (diff) | |
download | ghdl-173ec2e3096a6f7f5c9274d567c42511cf908386.tar.gz ghdl-173ec2e3096a6f7f5c9274d567c42511cf908386.tar.bz2 ghdl-173ec2e3096a6f7f5c9274d567c42511cf908386.zip |
testsuite.sh: add --nolog option.
-rwxr-xr-x | testsuite/testsuite.sh | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh index bb4d6e81e..8f3e04675 100755 --- a/testsuite/testsuite.sh +++ b/testsuite/testsuite.sh @@ -4,24 +4,44 @@ set -e . ./testenv.sh + +flag_log=yes +tests= + +for opt; do + case "$opt" in + --nolog) flag_log=no ;; + [a-z]*) tests="$tests $opt" ;; + *) echo "$0: unknown option $opt"; exit 2 ;; + esac +done + +if [ x$tests = x ]; then tests="gna vests"; fi + printf "$ANSI_BLUE[$TASK| GHDL - test] Sourced the testsuite environment $ANSI_NOCOLOR\n" # The GNA testsuite: regression testsuite using reports/issues from gna.org do_gna() { - cd gna && ./testsuite.sh 1>> ../../log.log 2>&1 + cd gna + if [ $flag_log = yes ]; then + ./testsuite.sh 1>> ../../log.log 2>&1 + else + ./testsuite.sh + fi cd .. } # The VESTS testsuite: compliance testsuite, from: https://github.com/nickg/vests.git 388250486a do_vests() { gnatmake get_entities 1>> ../log.log 2>&1 - cd vests && ./testsuite.sh + cd vests + ./testsuite.sh cd .. } # Run a testsuite do_test() { - printf "$ANSI_BLUE[$TASK| GHDL - test] $1 $ANSI_NOCOLOR\n" + printf "$ANSI_BLUE[$TASK| GHDL - test] $1 $ANSI_NOCOLOR\n" case $1 in gna) do_gna;; vests) do_vests;; @@ -33,9 +53,6 @@ do_test() { printf "$ANSI_BLUE[$TASK| GHDL - test] GHDL is: $GHDL $ANSI_NOCOLOR\n" -if [ $# -eq 0 ]; then tests="gna vests"; -else tests=$("$@"); fi - for t in $tests; do do_test $t; done printf "$ANSI_BLUE[$TASK| GHDL - test] $0: $cGREENSuccess$ANSI_BLUE [$GHDL] $ANSI_NOCOLOR\n" |