[PATCH 5/9] tests: Refactor weston launching syntax
Bryce Harrington
bryce at osg.samsung.com
Thu Apr 2 19:16:54 PDT 2015
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 <bryce at osg.samsung.com>
---
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 e5c23f7..f7ee27a 100755
--- a/tests/weston-tests-env
+++ b/tests/weston-tests-env
@@ -39,24 +39,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
More information about the wayland-devel
mailing list