[PATCH 5/5] tests: Refactor weston launching syntax
Pekka Paalanen
ppaalanen at gmail.com
Thu Apr 2 04:13:36 PDT 2015
On Wed, 1 Apr 2015 19:17:07 -0700
Bryce Harrington <bryce at osg.samsung.com> wrote:
> 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 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"
> +
I suppose this is fine in principle, I just have to adapt this to it:
http://cgit.collabora.com/git/user/pq/weston.git/tree/tests/weston-tests-env?h=ivi-test-5
ivi-*.la needs to use --ivi-module instead of --modules to load the
test plugin.
ivi-*.la and ivi-*.weston need a special config file (all tests use the
same file), must not load xwayland.so, and need ivi-shell.so as the
shell.
It's going to be messy in any case, I'm afraid. Any good ideas?
Thanks,
pq
More information about the wayland-devel
mailing list