There are only minor differences in the syntax for how weston is invoked
for .so/.la tests vs. other tests, but it's hard to spot them.  Refactor
the command itself out, so it becomes clearer what the difference is.

Signed-off-by: Bryce Harrington <[email protected]>
---
 tests/weston-tests-env | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/tests/weston-tests-env b/tests/weston-tests-env
index 3cb3073..173b6eb 100755
--- a/tests/weston-tests-env
+++ b/tests/weston-tests-env
@@ -37,24 +37,23 @@ fi
 
 case $TEST_FILE in
        *.la|*.so)
-               WESTON_BUILD_DIR=$abs_builddir \
-               $WESTON --backend=$MODDIR/$BACKEND \
-                       $CONFIG \
-                       --shell=$SHELL_PLUGIN \
-                       --socket=test-${TEST_NAME} \
-                       --modules=$MODDIR/${TEST_FILE/.la/.so},$XWAYLAND_PLUGIN 
\
-                       --log="$SERVERLOG" \
-                       &> "$OUTLOG"
+               TEST_MODULE=$MODDIR/${TEST_FILE/.la/.so}
+               client=
                ;;
        *)
-               WESTON_BUILD_DIR=$abs_builddir \
-               WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE $WESTON \
-                       --socket=test-${TEST_NAME} \
-                       --backend=$MODDIR/$BACKEND \
-                       $CONFIG \
-                       --shell=$SHELL_PLUGIN \
-                       --log="$SERVERLOG" \
-                       --modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \
-                       $($abs_builddir/$TEST_FILE --params) \
-                       &> "$OUTLOG"
+               export WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE
+               TEST_MODULE=$TEST_PLUGIN
+               client=$($WESTON_TEST_CLIENT_PATH --params)
 esac
+
+export WESTON_BUILD_DIR=$abs_builddir
+$WESTON \
+       --shell=$SHELL_PLUGIN \
+       --socket=test-${TEST_NAME} \
+       --modules=$TEST_MODULE,$XWAYLAND_PLUGIN \
+       --backend=$MODDIR/$BACKEND \
+       --log="$SERVERLOG" \
+       $CONFIG \
+       $client \
+       &> "$OUTLOG"
+
-- 
1.9.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to