Write a session for ui tests and use it for test-icons

This commit is contained in:
Marco Pesenti Gritti
2006-09-10 02:54:05 +02:00
parent 47cc58b1e6
commit 3884507a74
5 changed files with 40 additions and 14 deletions
+4 -1
View File
@@ -15,7 +15,7 @@ def setup_user(profile):
def get_nick_name():
return os.environ['SUGAR_NICK_NAME']
def setup_system():
def setup_python_path():
for path in sugar_python_path:
sys.path.insert(0, path)
if os.environ.has_key('PYTHONPATH'):
@@ -24,6 +24,9 @@ def setup_system():
else:
os.environ['PYTHONPATH'] = path
def setup_system():
setup_python_path()
for path in sugar_bin_path:
if os.environ.has_key('PATH'):
old_path = os.environ['PATH']
+2 -1
View File
@@ -4,4 +4,5 @@ sugar_PYTHON = \
DbusProcess.py \
Emulator.py \
MatchboxProcess.py \
Process.py
Process.py \
UITestSession.py
+21
View File
@@ -0,0 +1,21 @@
import os
from sugar.session.DbusProcess import DbusProcess
from sugar.session.MatchboxProcess import MatchboxProcess
from sugar.session.Emulator import Emulator
from sugar import env
class UITestSession:
def start(self):
env.setup_python_path()
if os.environ.has_key('SUGAR_EMULATOR') and \
os.environ['SUGAR_EMULATOR'] == 'yes':
emulator = Emulator()
emulator.start()
process = MatchboxProcess()
process.start()
process = DbusProcess()
process.start()