Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-28 12:17:21 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-28 12:17:21 (GMT)
commitc3f2927c630e19a408805e294e383d48cce45250 (patch)
tree1507be2c7d719bfe4ed84388a6cf23b11621ddbe /commands
parent8813f6d44eac5be4fb414dd3d6e50cc49f3e7aaa (diff)
Use sr-run-test
Diffstat (limited to 'commands')
-rw-r--r--commands/common.py1
-rwxr-xr-xcommands/helpers/test46
-rwxr-xr-xcommands/test4
3 files changed, 3 insertions, 48 deletions
diff --git a/commands/common.py b/commands/common.py
index 9a8ef41..37c295a 100644
--- a/commands/common.py
+++ b/commands/common.py
@@ -3,6 +3,7 @@ import sys
base_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
helpers_dir = os.path.join(base_dir, "commands", "helpers")
+tests_dir = os.path.join(base_dir, "tests")
sys.path.append(base_dir)
diff --git a/commands/helpers/test b/commands/helpers/test
deleted file mode 100755
index 4037a0d..0000000
--- a/commands/helpers/test
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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
diff --git a/commands/test b/commands/test
index a0707e0..0acfa09 100755
--- a/commands/test
+++ b/commands/test
@@ -9,5 +9,5 @@ from devbot import config
common.setup()
-run.run([os.path.join(common.helpers_dir, "test"),
- os.path.join(common.base_dir, "tests", "shell.py")])
+test = os.path.join(common.tests_dir, "shell.py")
+run.run(["sr-run-test", test, config.logs_dir])