diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-08-18 04:41:00 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-08-18 04:41:00 +0200 |
commit | 5fe560e5d6eb6bd967b0db3fa280deb29ad5d0d6 (patch) | |
tree | 704ad7bbbf98cec40947482323376f8177d9612f | |
parent | 4c80a688380e961ae08a05dbc30acb44cf58e8c5 (diff) | |
download | ghdl-5fe560e5d6eb6bd967b0db3fa280deb29ad5d0d6.tar.gz ghdl-5fe560e5d6eb6bd967b0db3fa280deb29ad5d0d6.tar.bz2 ghdl-5fe560e5d6eb6bd967b0db3fa280deb29ad5d0d6.zip |
travis-ci: move tests driver to buildtest.sh, clean cache before setting it.
-rwxr-xr-x | dist/linux/buildtest.sh | 40 | ||||
-rwxr-xr-x | dist/linux/docker-buildtest.sh | 2 | ||||
-rwxr-xr-x | dist/macosx/install-ada.sh | 3 | ||||
-rwxr-xr-x | testsuite/testsuite.sh | 25 |
4 files changed, 42 insertions, 28 deletions
diff --git a/dist/linux/buildtest.sh b/dist/linux/buildtest.sh index 86722b785..c97e9370c 100755 --- a/dist/linux/buildtest.sh +++ b/dist/linux/buildtest.sh @@ -43,27 +43,27 @@ cd "build-$BLD" #--- printf "$ANSI_BLUE[$TASK| GHDL] Environment $ANSI_NOCOLOR\n" -env 1>> ../log.log 2>&1 +env #--- printf "$ANSI_BLUE[$TASK| GHDL - build] Configure $ANSI_NOCOLOR\n" case "$BLD" in mcode) - ../configure "--prefix=$prefix" 1>> ../log.log 2>&1 + ../configure "--prefix=$prefix" ;; llvm) - ../configure "--prefix=$prefix" "--with-llvm-config" 1>> ../log.log 2>&1 + ../configure "--prefix=$prefix" "--with-llvm-config" ;; llvm-3.5) - ../configure "--prefix=$prefix" "--with-llvm-config=llvm-config-3.5" 1>> ../log.log 2>&1 + ../configure "--prefix=$prefix" "--with-llvm-config=llvm-config-3.5" MAKEOPTS="CXX=clang++" ;; llvm-3.8) - ../configure "--prefix=$prefix" "--with-llvm-config=llvm-config-3.8" 1>> ../log.log 2>&1 + ../configure "--prefix=$prefix" "--with-llvm-config=llvm-config-3.8" MAKEOPTS="CXX=clang++-3.8" ;; @@ -78,16 +78,23 @@ esac #--- +echo "travis_fold:start:build.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - build] Make $ANSI_NOCOLOR\n" -make $MAKEOPTS 1>> ../log.log 2>&1 +make $MAKEOPTS +echo "travis_fold:end:build.$TASK" + +echo "travis_fold:start:install.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - build] Install $ANSI_NOCOLOR\n" -make install 1>> ../log.log 2>&1 +make install cd .. +echo "travis_fold:end:install.$TASK" #--- +echo "travis_fold:start:tar.$TASK" printf "$ANSI_BLUE[$TASK| GHDL] Create package $ANSI_DARKCYAN$PKG_FILE $ANSI_NOCOLOR\n" -tar -zcvf "$PKG_FILE" -C "$prefix" . 1>> log.log 2>&1 +tar -zcvf "$PKG_FILE" -C "$prefix" . +echo "travis_fold:end:tar.$TASK" #--- @@ -95,10 +102,25 @@ export ENABLECOLOR="$ENABLECOLOR" export TASK="$TASK" export GHDL="$CDIR/install-$BLD/bin/ghdl" cd testsuite + +echo "travis_fold:start:tests.gna.$TASK" +printf "$ANSI_BLUE[$TASK| GHDL - test] gna $ANSI_NOCOLOR\n" +cd gna ./testsuite.sh cd .. +echo "travis_fold:end:tests.gna.$TASK" + +echo "travis_fold:start:tests.vests.$TASK" +printf "$ANSI_BLUE[$TASK| GHDL - test] vests $ANSI_NOCOLOR\n" +cd vests +./testsuite.sh +cd .. +echo "travis_fold:end:tests.vests.$TASK" + +$GHDL --version +cd .. #--- # Do not remove this line, and don't write anything below, since it is used to identify successful builds -echo "[$TASK|SUCCESSFUL]" 1>> log.log 2>&1 +echo "[$TASK|SUCCESSFUL]" diff --git a/dist/linux/docker-buildtest.sh b/dist/linux/docker-buildtest.sh index f34fc246d..270b9343d 100755 --- a/dist/linux/docker-buildtest.sh +++ b/dist/linux/docker-buildtest.sh @@ -61,6 +61,6 @@ if [ -n "$GRAB_SRCS" ]; then else - docker run --rm -tv $(pwd):/work:Z -w="/work" "$DOCKER_IMG" sh -c "./dist/linux/buildtest.sh $ENABLECOLOR -t $TASK -b $BLD -f $PKG_FILE" + docker run --rm -tv $(pwd):/work:Z -w="/work" "$DOCKER_IMG" sh -c "./dist/linux/buildtest.sh $ENABLECOLOR -t $TASK -b $BLD -f $PKG_FILE > log.log 2>&1" fi diff --git a/dist/macosx/install-ada.sh b/dist/macosx/install-ada.sh index 97bc762ec..13524e614 100755 --- a/dist/macosx/install-ada.sh +++ b/dist/macosx/install-ada.sh @@ -17,7 +17,8 @@ curl -o $tarfile http://mirrors.cdn.adacore.com/art/591c9045c7a447af2deed24e # un tar tar xf $tarfile -# Direct install +# Remove old gnat directory and install manually +rm -rf gnat mv gnat-gpl-2017-x86_64-darwin-bin gnat # Cleanup: remove components not needed diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh index 6cad0e2d7..43f6d369a 100755 --- a/testsuite/testsuite.sh +++ b/testsuite/testsuite.sh @@ -5,12 +5,10 @@ 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 @@ -23,41 +21,34 @@ printf "$ANSI_BLUE[$TASK| GHDL - test] Sourced the testsuite environment $ANSI_N # The GNA testsuite: regression testsuite using reports/issues from gna.org do_gna() { cd gna - if [ $flag_log = yes ]; then - ./testsuite.sh 1>> ../../log.log 2>&1 - else - ./testsuite.sh - fi + ./testsuite.sh cd .. } # The VESTS testsuite: compliance testsuite, from: https://github.com/nickg/vests.git 388250486a do_vests() { cd vests - if [ $flag_log = yes ]; then - ./testsuite.sh 1>> ../../log.log 2>&1 - else - ./testsuite.sh - fi + ./testsuite.sh cd .. } # Run a testsuite do_test() { - printf "$ANSI_BLUE[$TASK| GHDL - test] $1 $ANSI_NOCOLOR\n" case $1 in gna) do_gna;; vests) do_vests;; *) - printf *e "$ANSI_RED$0: test name '$1' is unknown $ANSI_NOCOLOR" + echo "$0: test name '$1' is unknown" exit 1;; esac } -printf "$ANSI_BLUE[$TASK| GHDL - test] GHDL is: $GHDL $ANSI_NOCOLOR\n" for t in $tests; do do_test $t; done -printf "$ANSI_BLUE[$TASK| GHDL - test] $0: $cGREENSuccess$ANSI_BLUE [$GHDL] $ANSI_NOCOLOR\n" -$GHDL --version 1>> ../log.log 2>&1 +echo "$0: Success" + +echo "GHDL is: $GHDL" +$GHDL --version + exit 0 |