From fabb49773e522a68e10c4be80067d28abecc4017 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 18 Feb 2016 16:26:23 +0530 Subject: [PATCH] Add a test for getting the path of a found program --- test cases/common/105 find program path/meson.build | 11 +++++++++++ test cases/common/105 find program path/program.py | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 test cases/common/105 find program path/meson.build create mode 100644 test cases/common/105 find program path/program.py 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 000000000..b21d6598e --- /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 000000000..2ebc56419 --- /dev/null +++ b/test cases/common/105 find program path/program.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print("Found")