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
|
|
|
|
|
2012-12-08 01:50:31 +04:00
|
|
|
WESTON=$abs_builddir/../src/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
|
|
|
|
2012-12-15 01:19:43 +04:00
|
|
|
if test x$WAYLAND_DISPLAY != x; then
|
|
|
|
BACKEND=$abs_builddir/../src/.libs/wayland-backend.so
|
|
|
|
elif test x$DISPLAY != x; then
|
|
|
|
BACKEND=$abs_builddir/../src/.libs/x11-backend.so
|
|
|
|
else
|
|
|
|
BACKEND=$abs_builddir/../src/.libs/wayland-backend.so
|
|
|
|
fi
|
|
|
|
|
2013-09-11 09:58:08 +04:00
|
|
|
case $TESTNAME in
|
2012-12-08 01:50:31 +04:00
|
|
|
*.la|*.so)
|
2012-12-15 01:19:43 +04:00
|
|
|
$WESTON --backend=$BACKEND \
|
2013-09-11 09:58:08 +04:00
|
|
|
--socket=test-$(basename $TESTNAME) \
|
|
|
|
--modules=$abs_builddir/.libs/${TESTNAME/.la/.so},xwayland.so \
|
2012-12-12 16:26:38 +04:00
|
|
|
--log="$SERVERLOG" \
|
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
;;
|
|
|
|
*)
|
2013-09-11 09:58:08 +04:00
|
|
|
WESTON_TEST_CLIENT_PATH=$abs_builddir/$TESTNAME $WESTON \
|
|
|
|
--socket=test-$(basename $TESTNAME) \
|
2012-12-15 01:19:43 +04:00
|
|
|
--backend=$BACKEND \
|
2012-12-12 16:26:38 +04:00
|
|
|
--log="$SERVERLOG" \
|
2013-02-08 16:57:00 +04:00
|
|
|
--modules=$abs_builddir/.libs/weston-test.so,xwayland.so \
|
2012-12-12 16:26:38 +04:00
|
|
|
&> "$OUTLOG"
|
2012-12-08 01:50:31 +04:00
|
|
|
esac
|