[PATCH 7/9] tests: Prefer bracket form of test command for consistency

Bryce Harrington bryce at osg.samsung.com
Thu Apr 2 19:16:56 PDT 2015


Also use variable default assignment to eliminate an if clause

Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
 tests/weston-tests-env | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/weston-tests-env b/tests/weston-tests-env
index 09fc3a3..53bf8d6 100755
--- a/tests/weston-tests-env
+++ b/tests/weston-tests-env
@@ -3,7 +3,7 @@
 TEST_FILE=${1##*/}
 TEST_NAME=${TEST_FILE%.*}
 
-if test -z "$TEST_NAME"; then
+if [ -z "$TEST_NAME" ]; then
 	echo "usage: $(basename $0) <test name>"
 	exit 1;
 fi
@@ -18,9 +18,7 @@ OUTLOG="$LOGDIR/${TEST_NAME}-log.txt"
 
 rm -f "$SERVERLOG"
 
-if test -z "$BACKEND"; then
-	BACKEND=headless-backend.so
-fi
+BACKEND=${BACKEND:-headless-backend.so}
 
 MODDIR=$abs_builddir/.libs
 
-- 
1.9.1



More information about the wayland-devel mailing list