aboutgitcodebugslistschat
path: root/test/lib/term
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/term')
-rwxr-xr-xtest/lib/term33
1 files changed, 18 insertions, 15 deletions
diff --git a/test/lib/term b/test/lib/term
index ed690de..f596364 100755
--- a/test/lib/term
+++ b/test/lib/term
@@ -19,6 +19,7 @@ STATUS_FILE_INDEX=0
STATUS_COLS=
STATUS_PASS=0
STATUS_FAIL=0
+STATUS_SKIPPED=0
PR_RED='\033[1;31m'
PR_GREEN='\033[1;32m'
@@ -28,32 +29,32 @@ PR_NC='\033[0m'
PR_DELAY_INIT=100 # ms
# info() - Highlight test log pane, print message to it and to log file
-# $@: Message to print
+# $*: Message to print
info() {
tmux select-pane -t ${PANE_INFO}
- printf "${@}\n" >> $STATEBASE/log_pipe
- printf "${@}\n" >> "${LOGFILE}"
+ printf "%b\n" "${*}" >> $STATEBASE/log_pipe
+ printf "%b\n" "${*}" >> "${LOGFILE}"
}
# info_n() - Highlight, print message to pane and to log file without newline
-# $@: Message to print
+# $*: Message to print
info_n() {
tmux select-pane -t ${PANE_INFO}
- printf "${@}" >> $STATEBASE/log_pipe
- printf "${@}" >> "${LOGFILE}"
+ printf "%b" "${*}" >> $STATEBASE/log_pipe
+ printf "%b" "${*}" >> "${LOGFILE}"
}
# info_nolog() - Highlight test log pane, print message to it
-# $@: Message to print
+# $*: Message to print
info_nolog() {
tmux select-pane -t ${PANE_INFO}
- printf "${@}\n" >> $STATEBASE/log_pipe
+ printf "%b\n" "${*}" >> $STATEBASE/log_pipe
}
# info_nolog() - Print message to log file
-# $@: Message to print
+# $*: Message to print
log() {
- printf "${@}\n" >> "${LOGFILE}"
+ printf "%b\n" "${*}" >> "${LOGFILE}"
}
# info_nolog_n() - Send message to pane without highlighting it, without newline
@@ -362,8 +363,8 @@ status_test_start() {
info_check() {
switch_pane ${PANE_INFO}
- printf "${PR_YELLOW}?${PR_NC} ${@}" >> $STATEBASE/log_pipe
- printf "? ${@}" >> "${LOGFILE}"
+ printf "%b" "${PR_YELLOW}?${PR_NC} ${*}" >> $STATEBASE/log_pipe
+ printf "? %b" "${*}" >> "${LOGFILE}"
}
# info_check_passed() - Display and log a new line when a check passes
@@ -439,19 +440,21 @@ info_layout() {
# status_test_ok() - Update counter of passed tests, log and display message
status_test_ok() {
STATUS_PASS=$((STATUS_PASS + 1))
- tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_passed
}
# status_test_fail() - Update counter of failed tests, log and display message
status_test_fail() {
STATUS_FAIL=$((STATUS_FAIL + 1))
- tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | #(TZ="UTC" date -Iseconds)"
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_failed
}
# status_test_fail() - Update counter of failed tests, log and display message
status_test_skip() {
+ STATUS_SKIPPED=$((STATUS_SKIPPED + 1))
+ tmux set status-right "PASS: ${STATUS_PASS} | FAIL: ${STATUS_FAIL} | SKIPPED: ${STATUS_SKIPPED} | #(TZ="UTC" date -Iseconds)"
info_skipped
}
@@ -704,7 +707,7 @@ term() {
tmux set window-status-current-style 'bg=colour1 fg=colour233 bold'
tmux set status-right '#(TZ="UTC" date -Iseconds)'
- tmux set status-right-length 50
+ tmux set status-right-length 64
tmux set status-right-style 'bg=colour1 fg=colour233 bold'
tmux set history-limit 500000