diff options
| author | L. E. Segovia <amy@amyspark.me> | 2025-05-29 15:10:39 -0300 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2025-06-03 20:10:45 +0530 |
| commit | 555502761e5bb78b0a5431f9c46987f0413fbe44 (patch) | |
| tree | 028ade96244af7a7fa02e120cd6fbec7bfec3995 /test cases/python | |
| parent | c614e5061c6cea0f5e19e8b6c74f16745d623444 (diff) | |
| download | meson-555502761e5bb78b0a5431f9c46987f0413fbe44.tar.gz | |
tests: Add test for checking get_executable_serialization with interpreted executables
Diffstat (limited to 'test cases/python')
| -rwxr-xr-x | test cases/python/11 script path/gen | 7 | ||||
| -rw-r--r-- | test cases/python/11 script path/meson.build | 19 | ||||
| -rwxr-xr-x | test cases/python/11 script path/run.py | 7 |
3 files changed, 33 insertions, 0 deletions
diff --git a/test cases/python/11 script path/gen b/test cases/python/11 script path/gen new file mode 100755 index 000000000..3d3169441 --- /dev/null +++ b/test cases/python/11 script path/gen @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + + +if __name__ == '__main__': + with open('x.c', 'w', encoding='utf-8') as f: + f.write('int main() { return 0; }\n') + exit(0) diff --git a/test cases/python/11 script path/meson.build b/test cases/python/11 script path/meson.build new file mode 100644 index 000000000..c913ca498 --- /dev/null +++ b/test cases/python/11 script path/meson.build @@ -0,0 +1,19 @@ +project('11 script path', 'c') + +if meson.backend() != 'ninja' + error('MESON_SKIP_TEST: Ninja backend required') +endif + +run = find_program('run.py') + +gen = find_program('gen') + +src = custom_target( + 'src', + command: [run, gen], + output: 'x.c', +) + +exe = executable('e', + src, +) diff --git a/test cases/python/11 script path/run.py b/test cases/python/11 script path/run.py new file mode 100755 index 000000000..a8e6011c7 --- /dev/null +++ b/test cases/python/11 script path/run.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys +import subprocess + +if __name__ == '__main__': + subprocess.check_call(sys.argv[1:]) |
