diff options
author | TheQwertiest <qwertiest@mail.ru> | 2020-05-21 17:05:04 +0300 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-06-28 18:13:49 -0400 |
commit | 4d0233540f15c686c199d8f464fc7499a094645e (patch) | |
tree | 2b9969d0bb330124abad9fcc71842c2760cc1479 /run_unittests.py | |
parent | b9b15816e85c3bc596a44650837af1c687fd6398 (diff) | |
download | meson-4d0233540f15c686c199d8f464fc7499a094645e.zip meson-4d0233540f15c686c199d8f464fc7499a094645e.tar.gz meson-4d0233540f15c686c199d8f464fc7499a094645e.tar.bz2 |
Added ability to pass arguments to backend in `meson compile`
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 9e8aa50..1af0d8b 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4636,6 +4636,7 @@ recommended as it is not supported on some platforms''') testdir = os.path.join(self.common_test_dir, '1 trivial') self.init(testdir) + self._run([*self.meson_command, 'compile', '-C', self.builddir]) # If compile worked then we should get a program self.assertPathExists(os.path.join(self.builddir, prog)) @@ -4643,6 +4644,20 @@ recommended as it is not supported on some platforms''') self._run([*self.meson_command, 'compile', '-C', self.builddir, '--clean']) self.assertPathDoesNotExist(os.path.join(self.builddir, prog)) + # `--$BACKEND-args` + + if self.backend is Backend.ninja: + self.init(testdir, extra_args=['--wipe']) + # Dry run - should not create a program + self._run([*self.meson_command, 'compile', '-C', self.builddir, '--ninja-args=-n']) + self.assertPathDoesNotExist(os.path.join(self.builddir, prog)) + elif self.backend is Backend.vs: + self.init(testdir, extra_args=['--wipe']) + self._run([*self.meson_command, 'compile', '-C', self.builddir]) + # Explicitly clean the target through msbuild interface + self._run([*self.meson_command, 'compile', '-C', self.builddir, '--vs-args=-t:{}:Clean'.format(re.sub(r'[\%\$\@\;\.\(\)\']', '_', prog))]) + self.assertPathDoesNotExist(os.path.join(self.builddir, prog)) + def test_spurious_reconfigure_built_dep_file(self): testdir = os.path.join(self.unit_test_dir, '75 dep files') |