2012-12-12 16:26:38 +04:00
|
|
|
#!/bin/bash
|
2012-04-12 20:54:14 +04:00
|
|
|
|
2015-04-03 05:16:52 +03:00
|
|
|
TEST_FILE=${1##*/}
|
|
|
|
TEST_NAME=${TEST_FILE%.*}
|
2013-09-11 09:58:08 +04:00
|
|
|
|
2015-04-03 05:16:56 +03:00
|
|
|
if [ -z "$TEST_NAME" ]; then
|
2013-09-11 09:58:08 +04:00
|
|
|
echo "usage: $(basename $0) <test name>"
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2014-02-01 02:03:09 +04:00
|
|
|
WESTON=$abs_builddir/weston
|
2012-12-12 16:26:38 +04:00
|
|
|
LOGDIR=$abs_builddir/logs
|
|
|
|
|
|
|
|
mkdir -p "$LOGDIR"
|
|
|
|
|
2015-04-03 05:16:53 +03:00
|
|
|
SERVERLOG="$LOGDIR/${TEST_NAME}-serverlog.txt"
|
|
|
|
OUTLOG="$LOGDIR/${TEST_NAME}-log.txt"
|
2012-12-12 16:26:38 +04:00
|
|
|
|
|
|
|
rm -f "$SERVERLOG"
|
2012-04-12 20:54:14 +04:00
|
|
|
|
2015-04-03 05:16:56 +03:00
|
|
|
BACKEND=${BACKEND:-headless-backend.so}
|
2012-12-15 01:19:43 +04:00
|
|
|
|
2015-03-24 16:56:16 +03:00
|
|
|
MODDIR=$abs_builddir/.libs
|
|
|
|
|
|
|
|
SHELL_PLUGIN=$MODDIR/desktop-shell.so
|
|
|
|
TEST_PLUGIN=$MODDIR/weston-test.so
|
|
|
|
XWAYLAND_PLUGIN=$MODDIR/xwayland.so
|
2014-02-07 12:34:47 +04:00
|
|
|
|
2015-04-03 05:16:52 +03:00
|
|
|
case $TEST_FILE in
|
2012-12-08 01:50:31 +04:00
|
|
|
*.la|*.so)
|
2014-08-21 20:32:38 +04:00
|
|
|
WESTON_BUILD_DIR=$abs_builddir \
|
2015-03-24 16:56:16 +03:00
|
|
|
$WESTON --backend=$MODDIR/$BACKEND \
|
2014-05-07 17:26:26 +04:00
|
|
|
--no-config \
|
2014-05-07 17:26:28 +04:00
|
|
|
--shell=$SHELL_PLUGIN \
|
2015-04-03 05:16:52 +03:00
|
|
|
--socket=test-${TEST_NAME} \
|
|
|
|
--modules=$MODDIR/${TEST_FILE/.la/.so},$XWAYLAND_PLUGIN \
|
2012-12-12 16:26:38 +04:00
|
|
|
--log="$SERVERLOG" \
|
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
;;
|
2015-03-23 14:55:06 +03:00
|
|
|
ivi-*.weston)
|
|
|
|
SHELL_PLUGIN=$MODDIR/ivi-shell.so
|
|
|
|
|
|
|
|
WESTON_BUILD_DIR=$abs_builddir \
|
|
|
|
WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE $WESTON \
|
|
|
|
--socket=test-${TEST_NAME} \
|
|
|
|
--backend=$MODDIR/$BACKEND \
|
|
|
|
--config=$abs_builddir/tests/weston-ivi.ini \
|
|
|
|
--shell=$SHELL_PLUGIN \
|
|
|
|
--log="$SERVERLOG" \
|
|
|
|
--modules=$TEST_PLUGIN \
|
|
|
|
$($abs_builddir/$TESTNAME --params) \
|
|
|
|
&> "$OUTLOG"
|
|
|
|
;;
|
2012-12-08 01:50:31 +04:00
|
|
|
*)
|
2014-08-21 20:32:38 +04:00
|
|
|
WESTON_BUILD_DIR=$abs_builddir \
|
2015-04-03 05:16:52 +03:00
|
|
|
WESTON_TEST_CLIENT_PATH=$abs_builddir/$TEST_FILE $WESTON \
|
|
|
|
--socket=test-${TEST_NAME} \
|
2015-03-24 16:56:16 +03:00
|
|
|
--backend=$MODDIR/$BACKEND \
|
2014-05-07 17:26:26 +04:00
|
|
|
--no-config \
|
2014-05-07 17:26:28 +04:00
|
|
|
--shell=$SHELL_PLUGIN \
|
2012-12-12 16:26:38 +04:00
|
|
|
--log="$SERVERLOG" \
|
2014-05-07 17:26:27 +04:00
|
|
|
--modules=$TEST_PLUGIN,$XWAYLAND_PLUGIN \
|
2015-04-03 05:16:52 +03:00
|
|
|
$($abs_builddir/$TEST_FILE --params) \
|
2012-12-12 16:26:38 +04:00
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
esac
|