Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-28 19:07:35 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-28 19:08:58 (GMT)
commitc9476f1837246cfe59c7a8e262e404def7c6f533 (patch)
treef1bb5669eade2419e20965ec61aa529f1c821635 /commands
parent18bda03d4ba8722b9d78d4a83896b8cfbb2ba489 (diff)
Make run-tests log everything
Diffstat (limited to 'commands')
-rwxr-xr-xcommands/run-tests18
1 files changed, 11 insertions, 7 deletions
diff --git a/commands/run-tests b/commands/run-tests
index 63497be..1ac1ea4 100755
--- a/commands/run-tests
+++ b/commands/run-tests
@@ -10,12 +10,11 @@ import common
from devbot import run
from devbot import test
-common.setup(log_name="test")
-
-def _clear_profile():
+def _get_profile():
profile_path = os.path.expanduser("~/.sugar/uitests")
shutil.rmtree(profile_path, ignore_errors=True)
+ return profile_path
def _get_test_path(name):
@@ -26,6 +25,8 @@ parser = argparse.ArgumentParser()
parser.add_argument("module", nargs="?", help="name of the module to test")
args = parser.parse_args()
+common.setup(log_name="test")
+
os.environ["SUGAR_LOGGER_LEVEL"] = "debug"
os.environ["SUGAR_PROFILE"] = "uitests"
os.environ["GTK_MODULES"] = "gail:atk-bridge"
@@ -33,12 +34,15 @@ os.environ["GTK_MODULES"] = "gail:atk-bridge"
if args.module:
test.test_one(args.module)
else:
+ print "\n= Checking =\n"
+
if not test.test():
sys.exit(1)
- _clear_profile()
- if run.run_test("sugar-runner", _get_test_path("shell.py")):
- sys.exit(1)
+ print "* Running UI test"
- if run.collect_logs(os.path.join(profile_path, "logs")):
+ profile_path = _get_profile()
+ result = run.run_test("sugar-runner", _get_test_path("shell.py"))
+ run.collect_logs(os.path.join(profile_path, "logs"))
+ if not result:
sys.exit(1)