travis: make verbosity (set -x, make -s) configurable

This commit is contained in:
Ralph Lange
2019-11-21 13:44:45 +01:00
parent a3858715a2
commit f5a502301e
5 changed files with 16 additions and 4 deletions

View File

@@ -64,6 +64,8 @@ matrix:
- env: SET=test01 - env: SET=test01
compiler: clang compiler: clang
- env: VV="" SET=test01
# - env: SET=test01 EXTRA="CMD_CXXFLAGS=-std=c++11" # - env: SET=test01 EXTRA="CMD_CXXFLAGS=-std=c++11"
# - env: SET=test01 EXTRA="CMD_CXXFLAGS=-std=c++11" # - env: SET=test01 EXTRA="CMD_CXXFLAGS=-std=c++11"

View File

@@ -5,7 +5,8 @@
# SET=test00 in .travis.yml runs the tests in this script # SET=test00 in .travis.yml runs the tests in this script
# all other jobs are started as compile jobs # all other jobs are started as compile jobs
set -x # Set VV empty in .travis.yml to make scripts terse
[ "${VV:-1}" ] && set -x
[ "$SET" != "test00" ] && exec ./travis/build.sh [ "$SET" != "test00" ] && exec ./travis/build.sh

View File

@@ -44,6 +44,7 @@ script:
# EXTRA content will be added to make command line # EXTRA content will be added to make command line
# STATIC set to YES for static build (default: NO) # STATIC set to YES for static build (default: NO)
# TEST set to NO to skip running the tests (default: YES) # TEST set to NO to skip running the tests (default: YES)
# VV set to make build scripts verbose (default: unset)
matrix: matrix:
include: include:

View File

@@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
set -e -x set -e
# Set VV in .travis.yml to make scripts verbose
[ "$VV" ] && set -x
make -j2 $EXTRA make -j2 $EXTRA

View File

@@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
set -e -x set -e
# Set VV in .travis.yml to make scripts verbose
[ "$VV" ] && set -x
# Perl version of "readlink -f" (which MacOS does not provide) # Perl version of "readlink -f" (which MacOS does not provide)
readlinkf() { perl -MCwd -e 'print Cwd::abs_path shift' "$1"; } readlinkf() { perl -MCwd -e 'print Cwd::abs_path shift' "$1"; }
@@ -156,11 +159,13 @@ fold_end set.up.compiler
fold_start build.dependencies "Rebuild missing dependencies" fold_start build.dependencies "Rebuild missing dependencies"
[ "$VV" ] && silent="-s" || silent=
for module in ${modules_to_compile} for module in ${modules_to_compile}
do do
name=$(basename $module) name=$(basename $module)
fold_start build.$name "Build $name" fold_start build.$name "Build $name"
make -j2 -C $module $EXTRA make -j2 $silent -C $module $EXTRA
fold_end build.$name fold_end build.$name
done done