diff options
author | Botao Sun <botao.sun@linaro.org> | 2014-10-17 00:30:06 +1100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-10-20 13:43:07 +0000 |
commit | 116e1fe62aef1b924ae61906c632064c1d64a2a9 (patch) | |
tree | b31c0eac6886da86f9b2a48fad6d0a78cd93bc1a /android | |
parent | 501c309c584e6087f1e24974b2863d42fc5e98d8 (diff) |
devicetree-android.sh: POSIX Compliant Update.
This change is to make the test script to be POSIX compliant.
Original patch comes from:
Lucas Dutra Nunes <ldnunes@ossystems.com.br>
Signed-off by: Botao Sun <botao.sun@linaro.org>
Change-Id: I12d20f4d778bf65e10877fb53d9f7cb8461a890c
Diffstat (limited to 'android')
-rwxr-xr-x | android/scripts/devicetree-android.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/android/scripts/devicetree-android.sh b/android/scripts/devicetree-android.sh index 7822f45..b38bd17 100755 --- a/android/scripts/devicetree-android.sh +++ b/android/scripts/devicetree-android.sh @@ -2,7 +2,7 @@ # # Device Tree test cases for Linaro Android # -# Copyright (C) 2013, Linaro Limited. +# Copyright (C) 2010 - 2014, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -20,7 +20,7 @@ # # Author: Botao Sun <botao.sun@linaro.org> -function check_return_fail() { +check_return_fail() { if [ $? -ne 0 ]; then fail_test "$1" return 0 @@ -29,17 +29,17 @@ function check_return_fail() { fi } -function fail_test() { +fail_test() { local reason=$1 echo "${TEST}: FAIL - ${reason}" } -function pass_test() { +pass_test() { echo "${TEST}: PASS" } -function check_root() { - if [ `whoami` == "root" ]; then +check_root() { + if [ `whoami` = "root" ]; then return 0 else return 1 |