forked from gusaroo/tuna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.in
executable file
·36 lines (32 loc) · 1.12 KB
/
run.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e
ABS_BUILDDIR='@ABS_BUILDDIR@'
ABS_SRCDIR='@ABS_SRCDIR@'
if [ "${PHOSH_VALGRIND}" = 1 ]; then
echo "Running phosh under valgrind"
WRAPPER="valgrind -v \
--tool=memcheck \
--leak-check=full \
--leak-resolution=high \
--num-callers=40 \
--log-file=vgdump \
--suppressions=${ABS_SRCDIR}/data/valgrind.suppressions \
--suppressions=/usr/share/glib-2.0/valgrind/glib.supp \
"
elif [ "${PHOSH_GDB}" = 1 ]; then
echo "Running phosh under gdb"
WRAPPER="gdb"
elif [ "${PHOSH_AUTO_GDB}" = 1 ]; then
echo "Running phosh under gdb"
WRAPPER="gdb -batch -ex run -ex bt"
fi
# Start up g-s-d, etc.
[ -n "${SKIP_GNOME_SESSION}" ] || gnome-session --session=gnome-dummy --disable-acceleration-check &
export GSETTINGS_SCHEMA_DIR="${ABS_BUILDDIR}/data:${GSETTINGS_SCHEMA_DIR}"
export G_MESSAGES_DEBUG=all
if [ -z "${GSETTINGS_BACKEND}" ]; then
# Make sure we don't mess with the systems gsettings:
export GSETTINGS_BACKEND=memory
fi
set -x
exec ${WRAPPER} "${ABS_BUILDDIR}/src/phosh" $@