diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-16 09:53:35 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-16 09:53:35 (GMT) |
commit | 61765e0aaae479b94a3fddd01e4e12eae76bb8da (patch) | |
tree | 4c00c5555c77d70db6bd8cae2768d365d12c6702 /commands/test | |
parent | 76d6fad87094008bc25e3b4e090fb79631414fec (diff) |
Move the remaining scripts to commands
Diffstat (limited to 'commands/test')
-rwxr-xr-x | commands/test | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/commands/test b/commands/test new file mode 100755 index 0000000..3378691 --- /dev/null +++ b/commands/test @@ -0,0 +1,47 @@ +#!/bin/sh + +commandsdir=`dirname "$0"` +helpersdir=$commandsdir/helpers +rootdir=`dirname "$helpersdir"` +testsdir=$rootdir/tests +logsdir=$rootdir/logs +display=`$helpersdir/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_UI_TESTS=yes + +xinit $helpersdir/xinitrc -- $xserver & +xinitpid=$! + +sleep 5 + +DISPLAY=$display python -u $testsdir/shell.py +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/ui-tests/logs + +for logfile in *.log +do + echo -e "===== $logfile =====\n" >> $LOGFILE + cat $logfile >> $LOGFILE + echo >> $LOGFILE +done + +exit $result |