aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-02-18 16:26:23 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-02-18 16:26:23 +0530
commitfabb49773e522a68e10c4be80067d28abecc4017 (patch)
tree4f54d383d51ff8aeb717e3f3b908f360027b6370 /test cases
parent601ff9162216d4ff6202231f51241c0d4b6f712f (diff)
downloadmeson-fabb49773e522a68e10c4be80067d28abecc4017.zip
meson-fabb49773e522a68e10c4be80067d28abecc4017.tar.gz
meson-fabb49773e522a68e10c4be80067d28abecc4017.tar.bz2
Add a test for getting the path of a found program
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/105 find program path/meson.build11
-rw-r--r--test cases/common/105 find program path/program.py3
2 files changed, 14 insertions, 0 deletions
diff --git a/test cases/common/105 find program path/meson.build b/test cases/common/105 find program path/meson.build
new file mode 100644
index 0000000..b21d659
--- /dev/null
+++ b/test cases/common/105 find program path/meson.build
@@ -0,0 +1,11 @@
+project('find program', 'c')
+
+prog = find_program('program.py')
+
+# Use either Python3 or 2 to run this
+python = find_program('python3', required : false)
+if not python.found()
+ python = find_program('python')
+endif
+
+run_command(python, prog.path())
diff --git a/test cases/common/105 find program path/program.py b/test cases/common/105 find program path/program.py
new file mode 100644
index 0000000..2ebc564
--- /dev/null
+++ b/test cases/common/105 find program path/program.py
@@ -0,0 +1,3 @@
+#!/usr/bin/env python3
+
+print("Found")