mirror of
https://github.com/powerline/powerline.git
synced 2025-07-24 22:36:01 +02:00
Print more detailed diagnostics
Specifically, disable set -x from main.sh, but add nicer print_environ function executed before each test suite, also setting `set -x` in `enter_suite`.
This commit is contained in:
parent
910c6a33dd
commit
466ee2e295
@ -1,5 +1,3 @@
|
|||||||
set +x
|
|
||||||
|
|
||||||
: ${USER:=`id -un`}
|
: ${USER:=`id -un`}
|
||||||
: ${HOME:=`getent passwd $USER | cut -d: -f6`}
|
: ${HOME:=`getent passwd $USER | cut -d: -f6`}
|
||||||
|
|
||||||
@ -17,8 +15,7 @@ export LD_LIBRARY_PATH
|
|||||||
export USER
|
export USER
|
||||||
export HOME
|
export HOME
|
||||||
|
|
||||||
. tests/bot-ci/scripts/common/main.sh
|
. tests/bot-ci/scripts/common/main.sh silent
|
||||||
set +x
|
|
||||||
|
|
||||||
if test -n "$USE_UCS2_PYTHON" && test -n "$BASH_VERSION" ; then
|
if test -n "$USE_UCS2_PYTHON" && test -n "$BASH_VERSION" ; then
|
||||||
set +e
|
set +e
|
||||||
@ -48,10 +45,22 @@ travis_fold() {
|
|||||||
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
|
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_environ() {
|
||||||
|
echo "Using $PYTHON_IMPLEMENTATION version $PYTHON_VERSION."
|
||||||
|
echo "Path to Python executable: $PYTHON."
|
||||||
|
echo "Root: $ROOT."
|
||||||
|
echo "Branch: $BRANCH_NAME."
|
||||||
|
echo "sys.path:"
|
||||||
|
"$PYTHON" -c "for path in __import__('sys').path: print(' %r' % path)"
|
||||||
|
}
|
||||||
|
|
||||||
enter_suite() {
|
enter_suite() {
|
||||||
|
set +x
|
||||||
local suite_name="$1" ; shift
|
local suite_name="$1" ; shift
|
||||||
export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE}/$suite_name"
|
export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE}/$suite_name"
|
||||||
travis_fold start "$POWERLINE_CURRENT_SUITE"
|
travis_fold start "$POWERLINE_CURRENT_SUITE"
|
||||||
|
print_environ
|
||||||
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_suite() {
|
exit_suite() {
|
||||||
@ -62,6 +71,7 @@ exit_suite() {
|
|||||||
echo "Suite ${POWERLINE_CURRENT_SUITE} failed, summary:"
|
echo "Suite ${POWERLINE_CURRENT_SUITE} failed, summary:"
|
||||||
echo "${FAIL_SUMMARY}"
|
echo "${FAIL_SUMMARY}"
|
||||||
fi
|
fi
|
||||||
|
set +x
|
||||||
travis_fold end "$POWERLINE_CURRENT_SUITE"
|
travis_fold end "$POWERLINE_CURRENT_SUITE"
|
||||||
export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE%/*}"
|
export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE%/*}"
|
||||||
if test "$1" != "--continue" ; then
|
if test "$1" != "--continue" ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user