From 31625e5b2a1df033a43949c9bb59ca71194fb2af Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 18 Aug 2017 05:58:57 +0200 Subject: travis-ci: don't disp gna log --- dist/linux/buildtest.sh | 85 ++++++++++++++++++++++++++----------------------- dist/linux/travis-ci.sh | 8 ++--- 2 files changed, 49 insertions(+), 44 deletions(-) (limited to 'dist/linux') 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 .. diff --git a/dist/linux/travis-ci.sh b/dist/linux/travis-ci.sh index 9b3e518da..44ca465c1 100755 --- a/dist/linux/travis-ci.sh +++ b/dist/linux/travis-ci.sh @@ -24,7 +24,7 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then PATH=$PWD/gnat/bin:$PATH DBLD=mcode DDIST=macosx - ./dist/linux/buildtest.sh $ENABLE_COLOR -t 0 -b "$DBLD" -f "ghdl-$PKG_TAG-$DBLD-$DDIST.tgz" + ./dist/linux/buildtest.sh $ENABLECOLOR -t 0 -b "$DBLD" -f "ghdl-$PKG_TAG-$DBLD-$DDIST.tgz" exit fi @@ -59,7 +59,7 @@ task() { DIMG=${images[${REFS[0]}]} thisworkdir="../wrk-$1" cp -r ./ "$thisworkdir" && cd "$thisworkdir" - ./dist/linux/docker-buildtest.sh -i "$DIMG" $ENABLE_COLOR -t "$1" -b "$DBLD" -f "ghdl-$PKG_TAG-$DBLD-$DDIST.tgz" + ./dist/linux/docker-buildtest.sh -i "$DIMG" $ENABLECOLOR -t "$1" -b "$DBLD" -f "ghdl-$PKG_TAG-$DBLD-$DDIST.tgz" cd "$cloned" } @@ -83,10 +83,10 @@ EXITCODE=0; t=0; for b in $blds; do workdir="../wrk-$t" # Display log (with travis log folding commands) - echo -e "travis_fold:start:log.$t\r\033[K" + echo "travis_fold:start:log.$t" printf "$ANSI_YELLOW[TRAVIS] Print BUILD $t log $ANSI_NOCOLOR\n" cat $workdir/log.log - echo -e "travis_fold:end:log.$t\r\033[K" + echo "travis_fold:end:log.$t" # Read the last line of the log RESULT="$(tail -1 $workdir/log.log)" -- cgit v1.2.3