Skip to content

Commit c7a74fd

Browse files
committed
testing: Allow enabling only timestamps without verbose command output
-t enables only the timestamps, -v additionally logs command output (includes -t).
1 parent 2132031 commit c7a74fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

testing/do-tests

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ subdir_cnt="0"
5151
##############################################################################
5252
# parse optional arguments
5353
#
54-
while getopts "v" opt
54+
while getopts "vt" opt
5555
do
5656
case "$opt" in
5757
v)
5858
verbose=YES
59+
timestamps=YES
60+
;;
61+
t)
62+
timestamps=YES
5963
;;
6064
esac
6165
done
@@ -64,7 +68,7 @@ shift $((OPTIND-1))
6468

6569
function print_time()
6670
{
67-
[ "$verbose" == "YES" ] && echo "$(date +%T.%N) ~ "
71+
[ "$timestamps" == "YES" ] && echo "$(date +%T.%N) ~ "
6872
}
6973

7074
##############################################################################

0 commit comments

Comments
 (0)