aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-08-18 05:58:57 +0200
committerTristan Gingold <tgingold@free.fr>2017-08-18 05:58:57 +0200
commit31625e5b2a1df033a43949c9bb59ca71194fb2af (patch)
treec94a5b9a18586a0c11b1ebb5d4fae4c41aa00dd8 /dist
parent1c2368f23c47baf365679a6b18bd1a900f80c130 (diff)
downloadghdl-31625e5b2a1df033a43949c9bb59ca71194fb2af.tar.gz
ghdl-31625e5b2a1df033a43949c9bb59ca71194fb2af.tar.bz2
ghdl-31625e5b2a1df033a43949c9bb59ca71194fb2af.zip
travis-ci: don't disp gna log
Diffstat (limited to 'dist')
-rw-r--r--dist/ansi_color.sh4
-rwxr-xr-xdist/linux/buildtest.sh85
-rwxr-xr-xdist/linux/travis-ci.sh8
3 files changed, 51 insertions, 46 deletions
diff --git a/dist/ansi_color.sh b/dist/ansi_color.sh
index 533e0e14b..6b81229c5 100644
--- a/dist/ansi_color.sh
+++ b/dist/ansi_color.sh
@@ -9,9 +9,9 @@ enable_color() {
ANSI_MAGENTA="\033[35m"
ANSI_CYAN="\033[36;1m"
ANSI_DARKCYAN="\033[36m"
- ANSI_NOCOLOR="\033[0m"
+ ANSI_NOCOLOR="\033[0m"
}
disable_color() { unset ENABLECOLOR ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARKCYAN ANSI_NOCOLOR; }
-enable_color \ No newline at end of file
+enable_color
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)"