test: Add expanders when running in travis
Hopefully this makes things more readable.
This commit is contained in:
2
test.sh
2
test.sh
@@ -12,7 +12,9 @@
|
|||||||
testsuite="$1"
|
testsuite="$1"
|
||||||
|
|
||||||
# print environment when running all testsuites
|
# print environment when running all testsuites
|
||||||
|
fold_start env.1 "environment"
|
||||||
test -z "$testsuite" && (echo "ENV:"; env; echo; )
|
test -z "$testsuite" && (echo "ENV:"; env; echo; )
|
||||||
|
fold_end env.1
|
||||||
|
|
||||||
# make it easy to split test into blocks
|
# make it easy to split test into blocks
|
||||||
label-block() {
|
label-block() {
|
||||||
|
|||||||
13
test/util.sh
13
test/util.sh
@@ -28,3 +28,16 @@ function run-test()
|
|||||||
{
|
{
|
||||||
"$@" || failures=$( [ -n "$failures" ] && echo "$failures\\n$@" || echo "$@" )
|
"$@" || failures=$( [ -n "$failures" ] && echo "$failures\\n$@" || echo "$@" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# travis expander helpers from:
|
||||||
|
# https://github.com/travis-ci/travis-rubies/blob/build/build.sh
|
||||||
|
fold_start() {
|
||||||
|
if env | grep -q -e '^TRAVIS=true$'; then
|
||||||
|
echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fold_end() {
|
||||||
|
if env | grep -q -e '^TRAVIS=true$'; then
|
||||||
|
echo -e "\ntravis_fold:end:$1\r"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user