diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-02-18 16:26:23 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-02-18 16:26:23 +0530 |
commit | fabb49773e522a68e10c4be80067d28abecc4017 (patch) | |
tree | 4f54d383d51ff8aeb717e3f3b908f360027b6370 /test cases | |
parent | 601ff9162216d4ff6202231f51241c0d4b6f712f (diff) | |
download | meson-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.build | 11 | ||||
-rw-r--r-- | test cases/common/105 find program path/program.py | 3 |
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") |