Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: gclient_utils.py

Issue 3357020: Enable parallel checkout by default to --jobs=8 and smoke tests. (Closed)
Patch Set: more fixes Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gclient.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2009 Google Inc. All Rights Reserved. 1 # Copyright 2009 Google Inc. All Rights Reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 running = self.running 588 running = self.running
589 self.running = [] 589 self.running = []
590 for t in running: 590 for t in running:
591 if t.isAlive(): 591 if t.isAlive():
592 self.running.append(t) 592 self.running.append(t)
593 else: 593 else:
594 t.join() 594 t.join()
595 t.kwargs['options'].stdout.full_flush() 595 t.kwargs['options'].stdout.full_flush()
596 if self.progress: 596 if self.progress:
597 self.progress.update(1) 597 self.progress.update(1)
598 assert not t.name in self.ran 598 assert not t.item.name in self.ran
599 if not t.name in self.ran: 599 if not t.item.name in self.ran:
600 self.ran.append(t.name) 600 self.ran.append(t.item.name)
601 601
602 def _run_one_task(self, task_item, args, kwargs): 602 def _run_one_task(self, task_item, args, kwargs):
603 if self.jobs > 1: 603 if self.jobs > 1:
604 # Start the thread. 604 # Start the thread.
605 index = len(self.ran) + len(self.running) + 1 605 index = len(self.ran) + len(self.running) + 1
606 # Copy 'options' and add annotated stdout. 606 # Copy 'options' and add annotated stdout.
607 task_kwargs = kwargs.copy() 607 task_kwargs = kwargs.copy()
608 task_kwargs['options'] = copy.copy(task_kwargs['options']) 608 task_kwargs['options'] = copy.copy(task_kwargs['options'])
609 task_kwargs['options'].stdout = StdoutAnnotated( 609 task_kwargs['options'].stdout = StdoutAnnotated(
610 '%d>' % index, task_kwargs['options'].stdout) 610 '%d>' % index, task_kwargs['options'].stdout)
(...skipping 28 matching lines...) Expand all
639 logging.info('Caught exception in thread %s' % self.item.name) 639 logging.info('Caught exception in thread %s' % self.item.name)
640 logging.info(str(sys.exc_info())) 640 logging.info(str(sys.exc_info()))
641 work_queue.exceptions.put(sys.exc_info()) 641 work_queue.exceptions.put(sys.exc_info())
642 logging.info('Task %s done' % self.item.name) 642 logging.info('Task %s done' % self.item.name)
643 643
644 work_queue.ready_cond.acquire() 644 work_queue.ready_cond.acquire()
645 try: 645 try:
646 work_queue.ready_cond.notifyAll() 646 work_queue.ready_cond.notifyAll()
647 finally: 647 finally:
648 work_queue.ready_cond.release() 648 work_queue.ready_cond.release()
OLDNEW
« no previous file with comments | « gclient.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698