2012-12-12 16:26:38 +04:00
|
|
|
#!/bin/bash
|
2012-04-12 20:54:14 +04:00
|
|
|
|
2013-09-11 09:58:08 +04:00
|
|
|
TESTNAME=$1
|
|
|
|
|
|
|
|
if test -z "$TESTNAME"; then
|
|
|
|
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"
|
|
|
|
|
|
|
|
SERVERLOG="$LOGDIR/$1-serverlog.txt"
|
|
|
|
OUTLOG="$LOGDIR/$1-log.txt"
|
|
|
|
|
|
|
|
rm -f "$SERVERLOG"
|
2012-04-12 20:54:14 +04:00
|
|
|
|
2014-02-07 12:34:47 +04:00
|
|
|
if test -z "$BACKEND"; then
|
|
|
|
BACKEND=headless-backend.so
|
2012-12-15 01:19:43 +04:00
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
2013-09-11 09:58:08 +04:00
|
|
|
case $TESTNAME 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 \
|
2013-09-11 09:58:08 +04:00
|
|
|
--socket=test-$(basename $TESTNAME) \
|
2015-03-24 16:56:16 +03:00
|
|
|
--modules=$MODDIR/${TESTNAME/.la/.so},$XWAYLAND_PLUGIN \
|
2012-12-12 16:26:38 +04:00
|
|
|
--log="$SERVERLOG" \
|
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
;;
|
|
|
|
*)
|
2014-08-21 20:32:38 +04:00
|
|
|
WESTON_BUILD_DIR=$abs_builddir \
|
2013-09-11 09:58:08 +04:00
|
|
|
WESTON_TEST_CLIENT_PATH=$abs_builddir/$TESTNAME $WESTON \
|
|
|
|
--socket=test-$(basename $TESTNAME) \
|
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 \
|
2014-11-20 02:06:20 +03:00
|
|
|
$($abs_builddir/$TESTNAME --params) \
|
2012-12-12 16:26:38 +04:00
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
esac
|