Only enable tracing for “final” suites: suites not having subsuites
This commit is contained in:
parent
23bec031a4
commit
4a834f38aa
|
@ -53,10 +53,17 @@ print_environ() {
|
||||||
enter_suite() {
|
enter_suite() {
|
||||||
set +x
|
set +x
|
||||||
local suite_name="$1" ; shift
|
local suite_name="$1" ; shift
|
||||||
|
local final="$1"
|
||||||
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
|
print_environ
|
||||||
|
if test "$final" = final ; then
|
||||||
|
if test -n "$POWERLINE_SUITE_FINAL" ; then
|
||||||
|
fail __suite__/enter/final E "Final suites do not allow nesting"
|
||||||
|
fi
|
||||||
|
export POWERLINE_SUITE_FINAL=1
|
||||||
set -x
|
set -x
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_suite() {
|
exit_suite() {
|
||||||
|
|
|
@ -102,7 +102,7 @@ if ! test -e "$DEPRECATED_SCRIPT" ; then
|
||||||
# skip "deprecated" "Missing deprecated bar bindings script"
|
# skip "deprecated" "Missing deprecated bar bindings script"
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
enter_suite "deprecated"
|
enter_suite "deprecated" final
|
||||||
for args in "" "0.5"; do
|
for args in "" "0.5"; do
|
||||||
rm -rf "$TEST_ROOT/results"
|
rm -rf "$TEST_ROOT/results"
|
||||||
mkdir "$TEST_ROOT/results"
|
mkdir "$TEST_ROOT/results"
|
||||||
|
@ -132,7 +132,7 @@ else
|
||||||
exit_suite --continue
|
exit_suite --continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
enter_suite "awesome"
|
enter_suite "awesome" final
|
||||||
ADDRESS="powerline-ipc-test-$$"
|
ADDRESS="powerline-ipc-test-$$"
|
||||||
echo "Powerline address: $ADDRESS"
|
echo "Powerline address: $ADDRESS"
|
||||||
rm -rf "$TEST_ROOT/results"
|
rm -rf "$TEST_ROOT/results"
|
||||||
|
|
|
@ -94,7 +94,7 @@ if ! test -e "$DEPRECATED_SCRIPT" ; then
|
||||||
# skip "deprecated" "Missing deprecated bar bindings script"
|
# skip "deprecated" "Missing deprecated bar bindings script"
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
enter_suite "deprecated"
|
enter_suite "deprecated" final
|
||||||
run python "$DEPRECATED_SCRIPT" $args > "$TEST_ROOT/deprecated.log" 2>&1 &
|
run python "$DEPRECATED_SCRIPT" $args > "$TEST_ROOT/deprecated.log" 2>&1 &
|
||||||
SPID=$!
|
SPID=$!
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -122,7 +122,7 @@ else
|
||||||
sleep 5
|
sleep 5
|
||||||
killscript $SPID
|
killscript $SPID
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
enter_suite "args($args)"
|
enter_suite "args($args)" final
|
||||||
fnum=0
|
fnum=0
|
||||||
for file in "$TEST_ROOT/results"/*.log ; do
|
for file in "$TEST_ROOT/results"/*.log ; do
|
||||||
if ! test -e "$file" ; then
|
if ! test -e "$file" ; then
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. tests/shlib/common.sh
|
. tests/shlib/common.sh
|
||||||
|
|
||||||
enter_suite daemon
|
enter_suite daemon final
|
||||||
|
|
||||||
export ADDRESS="powerline-ipc-test-$$"
|
export ADDRESS="powerline-ipc-test-$$"
|
||||||
echo "Powerline address: $ADDRESS"
|
echo "Powerline address: $ADDRESS"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
. tests/shlib/common.sh
|
. tests/shlib/common.sh
|
||||||
. tests/shlib/vterm.sh
|
. tests/shlib/vterm.sh
|
||||||
|
|
||||||
enter_suite tmux
|
enter_suite tmux final
|
||||||
|
|
||||||
vterm_setup
|
vterm_setup
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
. tests/shlib/vterm.sh
|
. tests/shlib/vterm.sh
|
||||||
. tests/shlib/vim.sh
|
. tests/shlib/vim.sh
|
||||||
|
|
||||||
enter_suite vvim
|
enter_suite vvim final
|
||||||
|
|
||||||
vterm_setup
|
vterm_setup
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. tests/shlib/common.sh
|
. tests/shlib/common.sh
|
||||||
|
|
||||||
enter_suite lint
|
enter_suite lint final
|
||||||
|
|
||||||
if ! "$PYTHON" "$ROOT/scripts/powerline-lint" -p "$ROOT/powerline/config_files" ; then
|
if ! "$PYTHON" "$ROOT/scripts/powerline-lint" -p "$ROOT/powerline/config_files" ; then
|
||||||
fail "test" F "Running powerline-lint failed"
|
fail "test" F "Running powerline-lint failed"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. tests/shlib/common.sh
|
. tests/shlib/common.sh
|
||||||
|
|
||||||
enter_suite python
|
enter_suite python final
|
||||||
|
|
||||||
for file in "$ROOT"/tests/test_python/test_*.py ; do
|
for file in "$ROOT"/tests/test_python/test_*.py ; do
|
||||||
test_name="${file##*/test_}"
|
test_name="${file##*/test_}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. tests/shlib/common.sh
|
. tests/shlib/common.sh
|
||||||
|
|
||||||
enter_suite shell
|
enter_suite shell final
|
||||||
|
|
||||||
if test $# -eq 0 ; then
|
if test $# -eq 0 ; then
|
||||||
FAST=1
|
FAST=1
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
. tests/shlib/vterm.sh
|
. tests/shlib/vterm.sh
|
||||||
. tests/shlib/vim.sh
|
. tests/shlib/vim.sh
|
||||||
|
|
||||||
enter_suite vim
|
enter_suite vim final
|
||||||
|
|
||||||
vterm_setup vim
|
vterm_setup vim
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue