From b9ec2be5a1b5abf37d2c04b852864374022092d8 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 2 Apr 2015 19:16:56 -0700 Subject: [PATCH] tests: Prefer bracket form of test command for consistency Also use variable default assignment to eliminate an if clause Signed-off-by: Bryce Harrington Reviewed-by: Pekka Paalanen --- 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 6c222ca2..fa36523a 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) " 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