Created
February 7, 2016 20:12
-
-
Save bsilver8192/10527a862ce16bb7f79a to your computer and use it in GitHub Desktop.
test for speed of Bazel's sandboxing code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs = ['input_%s' % i for i in range(3000)] | |
genrules = ['genrule_%s' % i for i in range(100)] | |
genrule( | |
name = 'gen_inputs', | |
outs = inputs, | |
cmd = 'touch ' + ' '.join(['$(location %s)' % i for i in inputs]), | |
) | |
[genrule( | |
name = 'gen_%s' % name, | |
srcs = inputs, | |
outs = [name], | |
cmd = 'touch $@', | |
) for name in genrules] | |
genrule( | |
name = 'gen_main', | |
srcs = genrules, | |
outs = ['main'], | |
cmd = 'touch $@', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment