diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-19 19:47:51 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-09-04 22:47:12 +0300 |
commit | 72a6683c6f564afa8f8d7e96b0238961aa867f00 (patch) | |
tree | b6c7828fcaaf52472626bb55efb1cad4ba7bad40 /test cases | |
parent | e94a9c8fcfa4776e09c9cabfe01de705ce34b735 (diff) | |
download | meson-72a6683c6f564afa8f8d7e96b0238961aa867f00.zip meson-72a6683c6f564afa8f8d7e96b0238961aa867f00.tar.gz meson-72a6683c6f564afa8f8d7e96b0238961aa867f00.tar.bz2 |
Permit overriding find_program from the cross file.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/unit/12 cross prog/meson.build | 12 | ||||
-rwxr-xr-x | test cases/unit/12 cross prog/some_cross_tool.py | 5 | ||||
-rwxr-xr-x | test cases/unit/12 cross prog/sometool.py | 5 |
3 files changed, 22 insertions, 0 deletions
diff --git a/test cases/unit/12 cross prog/meson.build b/test cases/unit/12 cross prog/meson.build new file mode 100644 index 0000000..e628701 --- /dev/null +++ b/test cases/unit/12 cross prog/meson.build @@ -0,0 +1,12 @@ +project('cross find program', 'c') + +native_exe = find_program('sometool.py', native : true) +cross_exe = find_program('sometool.py') + +native_out = run_command(native_exe).stdout().strip() +cross_out = run_command(cross_exe).stdout().strip() + +assert(native_out == 'native', + 'Native output incorrect:' + native_out) +assert(cross_out == 'cross', + 'Cross output incorrect:' + cross_out) diff --git a/test cases/unit/12 cross prog/some_cross_tool.py b/test cases/unit/12 cross prog/some_cross_tool.py new file mode 100755 index 0000000..1edd10f --- /dev/null +++ b/test cases/unit/12 cross prog/some_cross_tool.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from __future__ import print_function + +print('cross') diff --git a/test cases/unit/12 cross prog/sometool.py b/test cases/unit/12 cross prog/sometool.py new file mode 100755 index 0000000..4c0e3b1 --- /dev/null +++ b/test cases/unit/12 cross prog/sometool.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python + +from __future__ import print_function + +print('native') |