Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/build.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-26 17:16:07 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-26 18:17:29 (GMT)
commitdab868b20b936add86967eafe32711413b80dd6e (patch)
tree60fa49f59a8de148bd3fad607f688851678bbde8 /devbot/build.py
parent67d36d7eed2bf07063ba9cc7b3720f1efa4560ce (diff)
Rework logging and output
Use the logs for all the commands output. Tail the log if there is an error. Create a link to the latest log so that buildbot can find it easily.
Diffstat (limited to 'devbot/build.py')
-rw-r--r--devbot/build.py36
1 files changed, 23 insertions, 13 deletions
diff --git a/devbot/build.py b/devbot/build.py
index b51f0cf..31f926d 100644
--- a/devbot/build.py
+++ b/devbot/build.py
@@ -40,8 +40,17 @@ def pull_one(module_name):
def pull(lazy=False):
environ.setup()
+ to_pull = []
for module in config.load_modules():
- if not _pull_module(module, lazy):
+ git_module = module.get_git_module()
+ if not lazy or not os.path.exists(git_module.local):
+ to_pull.append(module)
+
+ if to_pull:
+ print "\n= Pulling =\n"
+
+ for module in to_pull:
+ if not _pull_module(module):
return False
return True
@@ -60,11 +69,12 @@ def build(full=False):
pull(lazy=True)
+ print "\n= Building =\n"
+
for module in config.load_modules():
- if state.built_module_is_unchanged(module):
- print "\n* Skipping unchanged module %s *" % module.name
- elif not _build_module(module, config.get_log_path("build")):
- return False
+ if not state.built_module_is_unchanged(module):
+ if not _build_module(module):
+ return False
_ccache_print_stats()
@@ -83,13 +93,15 @@ def distribute():
def clean():
+ print "= Cleaning =\n"
+
_empty_dir(config.install_dir)
_empty_dir(config.get_build_dir())
for module in config.load_modules():
if not module.out_of_source:
if module.get_git_module().clean():
- print "Cleaned %s git repository." % module.name
+ print "* Cleaning %s git repository" % module.name
def _ccache_reset():
@@ -97,7 +109,7 @@ def _ccache_reset():
def _ccache_print_stats():
- print "\n=== ccache statistics ===\n"
+ print "= ccache statistics ="
subprocess.check_call(["ccache", "-s"])
@@ -109,12 +121,10 @@ def _unlink_libtool_files():
os.path.walk(config.lib_dir, func, None)
-def _pull_module(module, lazy=False):
- git_module = module.get_git_module()
- if lazy and os.path.exists(git_module.local):
- return True
+def _pull_module(module):
+ print "* Pulling %s" % module.name
- print "\n=== Pulling %s ===\n" % module.name
+ git_module = module.get_git_module()
try:
git_module.update()
@@ -206,7 +216,7 @@ _distributors["autotools"] = _distribute_autotools
def _build_module(module, log=None):
- print "\n=== Building %s ===\n" % module.name
+ print "* Building %s" % module.name
source_dir = module.get_source_dir()