diff options
Diffstat (limited to 'test cases')
| -rw-r--r-- | test cases/common/273 customtarget exe for test/generate.py | 14 | ||||
| -rw-r--r-- | test cases/common/273 customtarget exe for test/meson.build | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test cases/common/273 customtarget exe for test/generate.py b/test cases/common/273 customtarget exe for test/generate.py new file mode 100644 index 000000000..e66f1db70 --- /dev/null +++ b/test cases/common/273 customtarget exe for test/generate.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +import os +import sys + +program = '''#!/usr/bin/env python3 + +raise SystemExit({}) +''' + +for i, a in enumerate(sys.argv[1:]): + with open(a, 'w') as f: + print(program.format(i), file=f) + os.chmod(a, 0o755) diff --git a/test cases/common/273 customtarget exe for test/meson.build b/test cases/common/273 customtarget exe for test/meson.build new file mode 100644 index 000000000..089d70dee --- /dev/null +++ b/test cases/common/273 customtarget exe for test/meson.build @@ -0,0 +1,14 @@ +project('test customtarget') + +ct1 = custom_target( + command: ['generate.py', '@OUTPUT@'], + output: 'a.py', +) +ct2 = custom_target( + command: ['generate.py', '@OUTPUT@'], + output: ['b.py', 'c.py'], +) + +test('using_custom_target', ct1) +test('using_custom_target_index', ct2[0]) +test('using_custom_target_index_1', ct2[1], should_fail: true) |
