aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-02-24 15:15:06 -0800
committerXavier Claessens <xclaesse@gmail.com>2020-03-04 14:07:27 -0500
commit1210a67f66df15a54fc7c65f7406bcd5391d15aa (patch)
tree9890464379ef921245c01bba0bcc5167b0e33b43 /run_unittests.py
parenta46f0a620228f9acfbf2340d6d9a2d58229720aa (diff)
downloadmeson-1210a67f66df15a54fc7c65f7406bcd5391d15aa.zip
meson-1210a67f66df15a54fc7c65f7406bcd5391d15aa.tar.gz
meson-1210a67f66df15a54fc7c65f7406bcd5391d15aa.tar.bz2
mesonbuild: Add mcompile command
This is tested working with both msbuild and ninja/samu. Since our xcode support is pretty much broken I didn't bother. Fixes #6670
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 3f5c87e..b9dcd41 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -4412,6 +4412,21 @@ recommended as it is not supported on some platforms''')
else:
self.assertEqual(expected_lines, out_lines)
+ def test_meson_compile(self):
+ """Test the meson compile command."""
+ prog = 'trivialprog'
+ if is_windows():
+ prog = '{}.exe'.format(prog)
+
+ 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))
+
+ self._run([*self.meson_command, 'compile', '-C', self.builddir, '--clean'])
+ self.assertPathDoesNotExist(os.path.join(self.builddir, prog))
+
class FailureTests(BasePlatformTests):
'''