Skip to content

Commit

Permalink
Fixed incorrectly-patched fabricate/benchmark per Lex.
Browse files Browse the repository at this point in the history
git-svn-id: http://fabricate.googlecode.com/svn/trunk@137 7d55530a-7836-11de-8a01-315fa775be5f
  • Loading branch information
benhoyt committed Aug 9, 2011
1 parent 76e490e commit 6754093
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ def usage():
jobs = int(sys.argv[4])
print benchmark(runner, jobs)
elif sys.argv[2] == 'benchmake':
if len(sys.argv) > 4:
jobs = int(sys.argv[4])
if len(sys.argv) > 3:
jobs = int(sys.argv[3])
print benchmake(jobs)
elif sys.argv[2] == 'clean':
clean()
Expand Down
10 changes: 5 additions & 5 deletions fabricate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,11 +1338,6 @@ def main(globals_dict=None, build_dir=None, extra_options=None, builder=None,
default_command = default
if not actions:
actions = [default_command]
if _pool is None and jobs > 1:
_pool = multiprocessing.Pool(jobs)
use_builder = (builder if builder is not None else
_setup_builder if _setup_builder is not None else Builder)
default_builder = use_builder(**kwargs)

original_path = os.getcwd()
if None in [globals_dict, build_dir]:
Expand All @@ -1362,6 +1357,11 @@ def main(globals_dict=None, build_dir=None, extra_options=None, builder=None,
if not options.quiet and os.path.abspath(build_dir) != original_path:
print "Entering directory '%s'" % build_dir
os.chdir(build_dir)
if _pool is None and jobs > 1:
_pool = multiprocessing.Pool(jobs)
use_builder = (builder if builder is not None else
_setup_builder if _setup_builder is not None else Builder)
default_builder = use_builder(**kwargs)

status = 0
try:
Expand Down

0 comments on commit 6754093

Please sign in to comment.