From 555502761e5bb78b0a5431f9c46987f0413fbe44 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Thu, 29 May 2025 15:10:39 -0300 Subject: tests: Add test for checking get_executable_serialization with interpreted executables --- test cases/python/11 script path/gen | 7 +++++++ test cases/python/11 script path/meson.build | 19 +++++++++++++++++++ test cases/python/11 script path/run.py | 7 +++++++ 3 files changed, 33 insertions(+) create mode 100755 test cases/python/11 script path/gen create mode 100644 test cases/python/11 script path/meson.build create mode 100755 test cases/python/11 script path/run.py (limited to 'test cases/python') 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:]) -- cgit v1.2.3