Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/test-ui
blob: 0570cf52a3f3a27bef97b9349bc9042f2b324d9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python

import os
import shutil
import sys

import common

from devbot import run

common.setup()

os.environ["SUGAR_LOGGER_LEVEL"] = "debug"
os.environ["SUGAR_PROFILE"] = "uitests"
os.environ["GTK_MODULES"] = "gail:atk-bridge"

profile_path = os.path.expanduser("~/.sugar/uitests")
shutil.rmtree(profile_path, ignore_errors=True)

virtual = "SUGAR_BUILDBOT" in os.environ
test_path = os.path.join(common.tests_dir, "sugar", "shell.py")

result = run.run_test("sugar-runner", test_path, virtual)

logs_path = os.path.join(profile_path, "logs")
run.merge_logs(logs_path, "test.log")

if not result:
    sys.exit(1)