mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 14:10:37 +02:00
prod/Common: try to obtain more consistent handling of \033 in echo
- Common (g_echo): wrapper for /bin/echo -e - Common (pass, fail, todo): use g_echo instead of regular "echo" for strings containing escape sequences
This commit is contained in:
parent
90ee726285
commit
6e3edf3d2e
12
prod/Common
12
prod/Common
@ -51,6 +51,12 @@ step()
|
||||
##### Test result ###########################################################
|
||||
|
||||
|
||||
g_echo()
|
||||
{
|
||||
/bin/echo -e "$@"
|
||||
}
|
||||
|
||||
|
||||
finish()
|
||||
{
|
||||
echo "$cmd" >>$LOG
|
||||
@ -62,7 +68,7 @@ finish()
|
||||
|
||||
pass()
|
||||
{
|
||||
echo '\r\033[42;30m PASS \033[0m '
|
||||
g_echo '\r\033[42;30m PASS \033[0m '
|
||||
echo "$step: PASS" >>$LOG
|
||||
finish </dev/null
|
||||
}
|
||||
@ -70,7 +76,7 @@ pass()
|
||||
|
||||
fail()
|
||||
{
|
||||
echo '\r\033[41;37m FAIL \033[0m '
|
||||
g_echo '\r\033[41;37m FAIL \033[0m '
|
||||
echo "$step: FAIL" >>$LOG
|
||||
finish
|
||||
#
|
||||
@ -82,7 +88,7 @@ fail()
|
||||
|
||||
todo()
|
||||
{
|
||||
echo '\r\033[43;30m TODO \033[0m '
|
||||
g_echo '\r\033[43;30m TODO \033[0m '
|
||||
echo "$step: TODO" >>$LOG
|
||||
finish </dev/null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user