blob: 4037a0daf955733bf9e36a6b0b5a1d2e3956aee1 (
plain)
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
37
38
39
40
41
42
43
44
45
46
|
#!/bin/sh
libexecdir=$SB_LIBEXEC_DIR
logsdir=$SB_LOGS_DIR
display=`$libexecdir/sugar-runner/find-free-display`
resolution=1024x768x16
xvfb=`which Xvfb`
xserver="$xvfb $display -ac -noreset -shmem -screen 0 $resolution"
if [ -z "$SUGAR_BUILDBOT" ]; then
xserver=$display
fi
export SUGAR_LOGGER_LEVEL=debug
export GTK_MODULES=gail:atk-bridge
export SUGAR_PROFILE=uitests
xinit $libexecdir/sugar-runner/xinitrc -- $xserver &
xinitpid=$!
sleep 5
DISPLAY=$display python -u $1
result=$?
kill $xinitpid
if [ -z "$SUGAR_BUILDBOT" ]; then
LOGFILE=$logsdir/test-`date +%Y%m%d-%H%M%S`.log
else
LOGFILE=$logsdir/test.log
fi
cd ~/.sugar/uitests/logs
for logfile in *.log
do
echo -e "===== $logfile =====\n" >> $LOGFILE
cat $logfile >> $LOGFILE
echo >> $LOGFILE
done
rm -rf ~/.sugar/uitests
exit $result
|