Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/run-tests
blob: a9919dfaff884871f91a5004b0f33f5fb4b9928e (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
30
31
32
33
#!/usr/bin/python

import os
import shutil
import sys

import common

from devbot import run
from devbot import test

common.setup()

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

if not test.test():
    sys.exit(1)

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.collect_logs(logs_path, "test")

if not result:
    sys.exit(1)