"""
def __init__(self, toolchains, args, progress, devnull, make_cmd,
- reference_src_dir, db_queue, col):
+ reference_src_dir, db_queue):
"""Create a new process slot.
Args:
self.make_cmd = (make_cmd, 'O=' + self.build_dir)
self.reference_src_dir = reference_src_dir
self.db_queue = db_queue
- self.col = col
+ self.col = progress.col
self.parser = KconfigParser(args, self.build_dir)
self.state = STATE_IDLE
self.failed_boards = set()
return self.failed_boards
class Slots:
-
"""Controller of the array of subprocess slots."""
- def __init__(self, toolchains, args, progress, reference_src_dir, db_queue,
- col):
+ def __init__(self, toolchains, args, progress, reference_src_dir, db_queue):
"""Create a new slots controller.
Args:
reference_src_dir (str): Determine the true starting config state
from this source tree (None for none)
db_queue (Queue): output queue to write config info for the database
- col (terminal.Color): Colour object
"""
self.args = args
self.slots = []
self.progress = progress
- self.col = col
+ self.col = progress.col
devnull = subprocess.DEVNULL
make_cmd = get_make_cmd()
for _ in range(args.jobs):
self.slots.append(Slot(toolchains, args, progress, devnull,
- make_cmd, reference_src_dir, db_queue, col))
+ make_cmd, reference_src_dir, db_queue))
def add(self, defconfig):
"""Add a new subprocess if a vacant slot is found.
col = terminal.Color(terminal.COLOR_NEVER if args.nocolour
else terminal.COLOR_IF_TERMINAL)
progress = Progress(col, len(defconfigs))
- slots = Slots(toolchains, args, progress, reference_src_dir, db_queue, col)
+ slots = Slots(toolchains, args, progress, reference_src_dir, db_queue)
# Main loop to process defconfig files:
# Add a new subprocess into a vacant slot.