From 2c8450b851c9595669012479b62372ba24976599 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Fri, 28 Dec 2012 17:20:36 +0000 Subject: Cleanup run-tests a bit --- (limited to 'commands') diff --git a/commands/run-tests b/commands/run-tests index 64d1970..33de39e 100755 --- a/commands/run-tests +++ b/commands/run-tests @@ -13,17 +13,12 @@ from devbot import test common.setup(log_name="test") -def _run_ui_tests(): +def _clear_profile(): profile_path = os.path.expanduser("~/.sugar/uitests") shutil.rmtree(profile_path, ignore_errors=True) - test_path = os.path.join(common.base_dir, "tests", "sugar", "shell.py") - result = run.run_test("sugar-runner", test_path) - - logs_path = os.path.join(profile_path, "logs") - run.collect_logs(logs_path) - - return result +def _get_test_path(name): + return os.path.join(common.base_dir, "tests", "sugar", name) parser = argparse.ArgumentParser() parser.add_argument("module", nargs="?", help="name of the module to test") @@ -39,5 +34,8 @@ else: if not test.test(): sys.exit(1) - if not _run_ui_tests(): + if run.run_test("sugar-runner", _get_test_path("shell.py")): + sys.exit(1) + + if run.collect_logs(os.path.join(profile_path, "logs")): sys.exit(1) -- cgit v0.9.1