diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-09 03:03:33 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-09 03:03:33 +0530 |
commit | 66ec8c42585f7ff278bdbc9289cd19b0bf929205 (patch) | |
tree | 7855bcc3a9bf9b5ace4ccec70d0d660d540eeaff /test cases | |
parent | 87f07cdf3db9923b41ac23d27d8e017c8c57ecc3 (diff) | |
download | meson-66ec8c42585f7ff278bdbc9289cd19b0bf929205.zip meson-66ec8c42585f7ff278bdbc9289cd19b0bf929205.tar.gz meson-66ec8c42585f7ff278bdbc9289cd19b0bf929205.tar.bz2 |
tests: Check that run_target can find a files() argument
Tests https://github.com/mesonbuild/meson/issues/957
Diffstat (limited to 'test cases')
-rwxr-xr-x | test cases/common/58 run target/check_exists.py | 7 | ||||
-rw-r--r-- | test cases/common/58 run target/meson.build | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/test cases/common/58 run target/check_exists.py b/test cases/common/58 run target/check_exists.py new file mode 100755 index 0000000..62cbe23 --- /dev/null +++ b/test cases/common/58 run target/check_exists.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +import os +import sys + +if not os.path.isfile(sys.argv[1]): + raise Exception("Couldn't find {!r}".format(sys.argv[1])) diff --git a/test cases/common/58 run target/meson.build b/test cases/common/58 run target/meson.build index 5824c74..0540b80 100644 --- a/test cases/common/58 run target/meson.build +++ b/test cases/common/58 run target/meson.build @@ -35,8 +35,8 @@ python3 = find_program('python3') run_target('py3hi', command : [python3, '-c', 'print("I am Python3.")']) -run_target('ct_in_arg', - command : ['echo', hex, files('helloprinter.c')]) +run_target('check_exists', + command : [find_program('check_exists.py'), files('helloprinter.c')]) # What if the output of a custom_target is the command to # execute. Obviously this will not work as hex is not an |