aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-05-02 16:33:08 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-11-14 15:57:37 -0800
commit42ddc30cfef6aebf4f8b595be4ac0dfa6f4da098 (patch)
treee928570b75365a1b1f96cab95ad051c89e989d67 /run_unittests.py
parentcb2a66cdef3776d917031ccecb7f96340eb3a42b (diff)
downloadmeson-42ddc30cfef6aebf4f8b595be4ac0dfa6f4da098.zip
meson-42ddc30cfef6aebf4f8b595be4ac0dfa6f4da098.tar.gz
meson-42ddc30cfef6aebf4f8b595be4ac0dfa6f4da098.tar.bz2
interpreter: allow find_program to use the native file
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 007a05b..b375629 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4522,6 +4522,32 @@ class NativeFileTests(BasePlatformTests):
f.write('py -3 {} %*'.format(filename))
return batfile
+ def test_multiple_native_files_override(self):
+ wrapper = self.helper_create_binary_wrapper('bash', version='foo')
+ config = self.helper_create_native_file({'binaries': {'bash': wrapper}})
+ wrapper = self.helper_create_binary_wrapper('bash', version='12345')
+ config2 = self.helper_create_native_file({'binaries': {'bash': wrapper}})
+ self.init(self.testcase, extra_args=[
+ '--native-file', config, '--native-file', config2,
+ '-Dcase=find_program'])
+
+ def test_multiple_native_files(self):
+ wrapper = self.helper_create_binary_wrapper('bash', version='12345')
+ config = self.helper_create_native_file({'binaries': {'bash': wrapper}})
+ wrapper = self.helper_create_binary_wrapper('python')
+ config2 = self.helper_create_native_file({'binaries': {'python': wrapper}})
+ self.init(self.testcase, extra_args=[
+ '--native-file', config, '--native-file', config2,
+ '-Dcase=find_program'])
+
+ def _simple_test(self, case, binary):
+ wrapper = self.helper_create_binary_wrapper(binary, version='12345')
+ config = self.helper_create_native_file({'binaries': {binary: wrapper}})
+ self.init(self.testcase, extra_args=['--native-file', config, '-Dcase={}'.format(case)])
+
+ def test_find_program(self):
+ self._simple_test('find_program', 'bash')
+
def unset_envs():
# For unit tests we must fully control all command lines