From c3f2927c630e19a408805e294e383d48cce45250 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 28 Nov 2012 12:17:21 +0000 Subject: Use sr-run-test --- 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]) -- cgit v0.9.1