This exercises commands of about 20K in length Also test short commandlines to make sure they don't regress.pull/7245/head
parent
c61f75adbf
commit
702d03e426
4 changed files with 38 additions and 0 deletions
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import sys |
||||
|
||||
with open(sys.argv[2], 'w') as f: |
||||
print('int func{n}(void) {{ return {n}; }}'.format(n=sys.argv[1]), file=f) |
@ -0,0 +1,5 @@ |
||||
int main(int argc, char **argv) { |
||||
(void) argc; |
||||
(void) argv; |
||||
return 0; |
||||
} |
@ -0,0 +1,21 @@ |
||||
project('very long command lines', 'c') |
||||
|
||||
seq = run_command('seq.py', '1', '256').stdout().strip().split('\n') |
||||
|
||||
sources = [] |
||||
codegen = find_program('codegen.py') |
||||
|
||||
foreach i : seq |
||||
sources += custom_target('codegen' + i, |
||||
command: [codegen, i, '@OUTPUT@'], |
||||
output: 'test' + i + '.c') |
||||
endforeach |
||||
|
||||
shared_library('sharedlib', sources) |
||||
static_library('staticlib', sources) |
||||
executable('app', 'main.c', sources) |
||||
|
||||
# Also test short commandlines to make sure that doesn't regress |
||||
shared_library('sharedlib0', sources[0]) |
||||
static_library('staticlib0', sources[0]) |
||||
executable('app0', 'main.c', sources[0]) |
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import sys |
||||
|
||||
for i in range(int(sys.argv[1]), int(sys.argv[2])): |
||||
print(i) |
Loading…
Reference in new issue