On Fri, Apr 15, 2016 at 10:52:49PM +0200, Radim Krčmář wrote: > Turn skip into yellow SKIP and add reusable definitions of all tags. > > Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> > --- > scripts/runtime.bash | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/scripts/runtime.bash b/scripts/runtime.bash > index 4f29a59307f3..59f0df080988 100644 > --- a/scripts/runtime.bash > +++ b/scripts/runtime.bash > @@ -2,6 +2,10 @@ > : ${MAX_SMP:=$(getconf _NPROCESSORS_CONF)} > : ${TIMEOUT:=90s} > > +PASS() { echo -ne "\e[32mPASS\e[0m"; } > +SKIP() { echo -ne "\e[33mSKIP\e[0m"; } > +FAIL() { echo -ne "\e[31mFAIL\e[0m"; } > + > function run() > { > local testname="$1" > @@ -23,7 +27,7 @@ function run() > fi > > if [ -n "$arch" ] && [ "$arch" != "$ARCH" ]; then > - echo "skip $1 ($arch only)" > + echo "`SKIP` $1 ($arch only)" > return 2 > fi > > @@ -34,14 +38,14 @@ function run() > path=${check_param%%=*} > value=${check_param#*=} > if [ "$path" ] && [ "$(cat $path)" != "$value" ]; then > - echo "skip $1 ($path not equal to $value)" > + echo "`SKIP` $1 ($path not equal to $value)" > return 2 > fi > done > > cmdline="TIMEOUT=$timeout ACCEL=$accel $RUNTIME_arch_run /dev/null -smp $smp $opts" > eval $cmdline |& grep -q "could not load kernel" || { > - echo "skip $1 (QEMU won't run)" > + echo "`SKIP` $1 (QEMU won't run)" > return 2 > } > > @@ -56,13 +60,13 @@ function run() > ret=$? > > if [ $ret -eq 0 ]; then > - echo -e "\e[32mPASS\e[0m $1" > + echo "`PASS` $1" > elif [ $ret -eq 77 ]; then > - echo -e "\e[33mSKIP\e[0m $1" > + echo "`SKIP` $1" > elif [ $ret -eq 124 ]; then > - echo -e "\e[31mFAIL\e[0m $1 (timeout; duration=$timeout)" > + echo "`FAIL` $1 (timeout; duration=$timeout)" > else > - echo -e "\e[31mFAIL\e[0m $1" > + echo "`FAIL` $1" > fi > > return $ret > -- > 2.8.1 > Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html