-k option builds as many components as possible
authorTimo Savola <tsavola@movial.fi>
Tue, 8 Apr 2008 14:59:48 +0000 (17:59 +0300)
committerTimo Savola <tsavola@movial.fi>
Tue, 8 Apr 2008 15:11:25 +0000 (18:11 +0300)
matrix/build.py
matrix/config.py
matrix/matrix.py

index 8801fc9..a88c8e6 100644 (file)
@@ -162,7 +162,8 @@ class Builder(object):
                       self.can_start_job()
 
        def can_start_job(self):
-               return not self.error and len(self.jobs) < self.max_jobs
+               return (not self.error or config.keep_going) and \
+                      len(self.jobs) < self.max_jobs
 
        def start_build(self, c):
                if not c.repo.exists():
index b146ba2..efdef4f 100644 (file)
@@ -19,6 +19,7 @@ libc = 'glibc'
 verbose = False
 debug = False
 force = False
+keep_going = False
 
 class Board(object):
        def __init__(self, name, arch, gcc_march, gcc_mcpu='', gcc_mfpu='', gcc_options='', gnu_host='', flash_erase_size='65536', flash_pad_size='0'):
index 8c020ad..87f4b68 100644 (file)
@@ -81,6 +81,7 @@ Options:
                        components file will be used.  This option may be
                        specified multiple times.
        -f              Build components with dirty files.
+       -k              Build as much as possible after an error.
        -h, --help      Print this help text.
 
 Commands and parameters:
@@ -124,6 +125,8 @@ def parse_args(args):
                                        config.roots.append(args[i])
                                elif args[i] == '-f':
                                        config.force = True
+                               elif args[i] == '-k':
+                                       config.keep_going = True
                                elif args[i] in ('-h', '--help'):
                                        help(sys.stdout, args)
                                        sys.exit(0)