diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-28 21:59:21 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-28 21:59:21 (GMT) |
commit | ff8370dc4d0d57f24b7b68bbe582d2dbbf76eda6 (patch) | |
tree | 155106afff67b6cc1dd6a1c64f7eb6c5b1a4e9ab /commands/check | |
parent | c3a37eaf4f75e9f6e072121cc237a57d8605a6e3 (diff) |
Add a run_build function to main
This avoids duplication and circular deps
Diffstat (limited to 'commands/check')
-rwxr-xr-x | commands/check | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/commands/check b/commands/check index 66e1ed5..5c29599 100755 --- a/commands/check +++ b/commands/check @@ -10,8 +10,7 @@ import common from devbot import run from devbot import check from devbot import command -from devbot import system -from devbot import build +from devbot import main def _get_profile(): profile_path = os.path.expanduser("~/.sugar/uitests") @@ -95,8 +94,15 @@ def _check_ui(): return result -def _check_modules(): - return check.check() +def _run_checks(): + if not _check_devbot(): + return False + + if not _check_modules(): + return False + + if not check.check(): + sys.exit(1) parser = argparse.ArgumentParser() @@ -113,20 +119,8 @@ if args.module: if not check.check_one(args.module): sys.exit(1) else: - if not system.check(lazy=True): - sys.exit(1) - - if not build.pull(lazy=True): - sys.exit(1) - - if not build.build(): - sys.exit(1) - - if not _check_devbot(): - sys.exit(1) - - if not _check_modules(): + if not main.run_build(full=False): sys.exit(1) - if not _check_ui(): + if not _run_checks(): sys.exit(1) |