Skip to content

Commit

Permalink
Swapping tabs for spaces in generate_projects.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Jul 11, 2015
1 parent 4547d50 commit 368524c
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions tools/buildgen/generate_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,30 @@

jobs = []
for root, dirs, files in os.walk('templates'):
for f in files:
if os.path.splitext(f)[1] == '.template':
out = '.' + root[len('templates'):] + '/' + os.path.splitext(f)[0]
cmd = ['tools/buildgen/mako_renderer.py']
for plugin in plugins:
cmd.append('-p')
cmd.append(plugin)
for js in json:
cmd.append('-d')
cmd.append(js)
cmd.append('-o')
if test is None:
cmd.append(out)
else:
tf = tempfile.mkstemp()
test[out] = tf[1]
os.close(tf[0])
cmd.append(test[out])
cmd.append(root + '/' + f)
jobs.append(jobset.JobSpec(cmd, shortname=out))
for f in files:
if os.path.splitext(f)[1] == '.template':
out = '.' + root[len('templates'):] + '/' + os.path.splitext(f)[0]
cmd = ['tools/buildgen/mako_renderer.py']
for plugin in plugins:
cmd.append('-p')
cmd.append(plugin)
for js in json:
cmd.append('-d')
cmd.append(js)
cmd.append('-o')
if test is None:
cmd.append(out)
else:
tf = tempfile.mkstemp()
test[out] = tf[1]
os.close(tf[0])
cmd.append(test[out])
cmd.append(root + '/' + f)
jobs.append(jobset.JobSpec(cmd, shortname=out))

jobset.run(jobs)

if test is not None:
for s, g in test.iteritems():
assert(0 == os.system('diff %s %s' % (s, g)))
os.unlink(g)
for s, g in test.iteritems():
assert(0 == os.system('diff %s %s' % (s, g)))
os.unlink(g)

0 comments on commit 368524c

Please sign in to comment.