diff options
Diffstat (limited to 'dist/linux/buildtest.sh')
-rwxr-xr-x | dist/linux/buildtest.sh | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/dist/linux/buildtest.sh b/dist/linux/buildtest.sh index a781e6ca0..b6d654dee 100755 --- a/dist/linux/buildtest.sh +++ b/dist/linux/buildtest.sh @@ -6,8 +6,6 @@ disable_color # Stop in case of error set -e -echo "$@" - # Transform long options to short ones for arg in "$@"; do shift @@ -42,52 +40,43 @@ mkdir "$prefix" mkdir "build-$BLD" cd "build-$BLD" -#--- +#--- Env echo "travis_fold:start:env.$TASK" printf "$ANSI_BLUE[$TASK| GHDL] Environment $ANSI_NOCOLOR\n" env echo "travis_fold:end:env.$TASK" -#--- +#--- Configure echo "travis_fold:start:configure.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - build] Configure $ANSI_NOCOLOR\n" case "$BLD" in - mcode) - ../configure "--prefix=$prefix" - ;; - - llvm) - ../configure "--prefix=$prefix" "--with-llvm-config" - ;; - - llvm-3.5) - ../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" - MAKEOPTS="CXX=clang++-3.8" - ;; - - docker) - printf "$ANSI_MAGENTA[$TASK| GHDL - build] Check docker container! $ANSI_NOCOLOR\n" - exit 0;; - - *) - printf "$ANSI_RED[$TASK| GHDL - build] Unknown build $BLD $ANSI_NOCOLOR\n" - exit 1;; + mcode) + config_opts="" ;; + llvm) + config_opts="--with-llvm-config" ;; + llvm-3.5) + config_opts="--with-llvm-config=llvm-config-3.5 CXX=clang++" ;; + llvm-3.8) + config_opts="--with-llvm-config=llvm-config-3.8 CXX=clang++-3.8" ;; + docker) + echo "Check docker container!" + exit 0;; + *) + echo "$ANSI_RED[$TASK| GHDL - build] Unknown build $BLD $ANSI_NOCOLOR" + exit 1;; esac +echo "../configure --prefix=$prefix $config_opts" +../configure "--prefix=$prefix" $config_opts echo "travis_fold:end:configure.$TASK" -#--- +#--- make -echo "travis_fold:start:build.$TASK" +echo "travis_fold:start:make.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - build] Make $ANSI_NOCOLOR\n" -make $MAKEOPTS -echo "travis_fold:end:build.$TASK" +make +echo "travis_fold:end:make.$TASK" echo "travis_fold:start:install.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - build] Install $ANSI_NOCOLOR\n" @@ -95,26 +84,41 @@ make install cd .. echo "travis_fold:end:install.$TASK" -#--- +#--- package 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" . echo "travis_fold:end:tar.$TASK" -#--- +#--- test -export ENABLECOLOR="$ENABLECOLOR" -export TASK="$TASK" -export GHDL="$CDIR/install-$BLD/bin/ghdl" +export ENABLECOLOR TASK +export GHDL="$prefix/bin/ghdl" cd testsuite +failures="" echo "travis_fold:start:tests.gna.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - test] gna $ANSI_NOCOLOR\n" cd gna -./testsuite.sh +dirs=`./testsuite.sh --list-tests` +for d in $dirs; do + cd $d + if ./testsuite.sh > test.log 2>&1 ; then + echo "gna $d: ok" + # Don't disp log + else + echo "${ANSI_RED}gna $d: failed${ANSI_NOCOLOR}" + cat test.log + failures="$failures $d" + fi + cd .. + # Stop at the first failure + [ "$failures" = "" ] || break +done cd .. echo "travis_fold:end:tests.gna.$TASK" +[ "$failures" = "" ] || exit 1 echo "travis_fold:start:tests.vests.$TASK" printf "$ANSI_BLUE[$TASK| GHDL - test] vests $ANSI_NOCOLOR\n" @@ -125,10 +129,11 @@ if ./testsuite.sh > vests.log 2>&1 ; then else cat vests.log echo "${ANSI_RED}Vests failure$ANSI_NOCOLOR" - exit 1 + failures=vests fi cd .. echo "travis_fold:end:tests.vests.$TASK" +[ "$failures" = "" ] || exit 1 $GHDL --version cd .. |