Add a test case for very long command lines

This exercises commands of about 20K in length

Also test short commandlines to make sure they don't regress.
pull/7245/head
Jon Turney 6 years ago committed by Dan Kegel
parent c61f75adbf
commit 702d03e426
  1. 6
      test cases/common/234 very long commmand line/codegen.py
  2. 5
      test cases/common/234 very long commmand line/main.c
  3. 21
      test cases/common/234 very long commmand line/meson.build
  4. 6
      test cases/common/234 very long commmand line/seq.py

@ -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…
Cancel
Save