|
| 1 | +# Copyright 2022 EngFlow Inc. All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (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 |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# The following genrules are able to produce thousands of targets based |
| 16 | +# on the user's input. |
| 17 | +# This can be used for stress testing your build infrastructure. |
| 18 | +# Change the upper bound of the range and enjoy! |
| 19 | +UPPER_BOUND = 10 |
| 20 | +[genrule( |
| 21 | + name = "foo_TXT_4KB_" + str(x), |
| 22 | + outs = ["foo_text" + str(x) + ".txt"], |
| 23 | + cmd = "echo 'Hello engflow world' > $@", |
| 24 | +) for x in range(1,UPPER_BOUND)] |
| 25 | + |
| 26 | +[genrule( |
| 27 | + name = "gnu-manifesto_PDF_76KB" + str(x), |
| 28 | + outs = ["gnu-manifesto" + str(x) + ".pdf"], |
| 29 | + cmd = "cp $(location gnu-manifesto.pdf) $@", |
| 30 | + tools = ["gnu-manifesto.pdf"] |
| 31 | +) for x in range(1,UPPER_BOUND)] |
| 32 | + |
| 33 | +[genrule( |
| 34 | + name = "emacs_TARGZ_68MB" + str(x), |
| 35 | + outs = ["emacs" + str(x) + ".tar.gz"], |
| 36 | + cmd = "cp $(location @emacs//file) $@", |
| 37 | + tools = ["@emacs//file"] |
| 38 | +) for x in range(1,UPPER_BOUND)] |
| 39 | + |
| 40 | +[genrule( |
| 41 | + name = "ubuntu_20.04_1.3GB" + str(x), |
| 42 | + outs = ["ubuntu_20.04_1.3GB" + str(x) + ".iso"], |
| 43 | + cmd = "cp $(location @ubuntu_20.04_1.3GB//file) $@", |
| 44 | + tools = ["@ubuntu_20.04_1.3GB//file"] |
| 45 | +) for x in range(1,2)] |
0 commit comments