Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/test
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-28 01:04:15 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-28 01:04:15 (GMT)
commite571d1d525359f562074d6922ac06e35ac49b48c (patch)
treebbb6dbba110c44de83455b0cd49836642b898cea /commands/test
parent016dea75191a76c01362850d4874d27fa0fb13e0 (diff)
Refactor to use sugar-runner
Diffstat (limited to 'commands/test')
-rwxr-xr-xcommands/test49
1 files changed, 6 insertions, 43 deletions
diff --git a/commands/test b/commands/test
index 18adf3d..6a18454 100755
--- a/commands/test
+++ b/commands/test
@@ -1,47 +1,10 @@
-#!/bin/sh
+#!/usr/bin/python
-commandsdir=`dirname "$0"`
-helpersdir=$commandsdir/helpers
-rootdir=`dirname "$commandsdir"`
-testsdir=$rootdir/tests
-logsdir=$rootdir/logs
-display=`$helpersdir/find-free-display`
-resolution=1024x768x16
+import os
-xvfb=`which Xvfb`
-xserver="$xvfb $display -ac -noreset -shmem -screen 0 $resolution"
+import common
-if [ -z "$SUGAR_BUILDBOT" ]; then
- xserver=$display
-fi
+from devbot import run
-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
+common.setup()
+run.run([os.path.join(common.helpers_dir, "test")])