summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorL. E. Segovia <amy@amyspark.me>2025-05-29 15:10:39 -0300
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2025-06-03 20:10:45 +0530
commit555502761e5bb78b0a5431f9c46987f0413fbe44 (patch)
tree028ade96244af7a7fa02e120cd6fbec7bfec3995 /test cases
parentc614e5061c6cea0f5e19e8b6c74f16745d623444 (diff)
downloadmeson-555502761e5bb78b0a5431f9c46987f0413fbe44.tar.gz
tests: Add test for checking get_executable_serialization with interpreted executables
Diffstat (limited to 'test cases')
-rwxr-xr-xtest cases/python/11 script path/gen7
-rw-r--r--test cases/python/11 script path/meson.build19
-rwxr-xr-xtest cases/python/11 script path/run.py7
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:])