Write a session for ui tests and use it for test-icons
This commit is contained in:
+4
-1
@@ -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']
|
||||
|
||||
@@ -4,4 +4,5 @@ sugar_PYTHON = \
|
||||
DbusProcess.py \
|
||||
Emulator.py \
|
||||
MatchboxProcess.py \
|
||||
Process.py
|
||||
Process.py \
|
||||
UITestSession.py
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user