aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-10-04 11:54:47 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-10-15 23:46:35 +0300
commita1a8772034aef90e8d58230d8bcfce54ab27bf6a (patch)
tree7209cf26e6da0abe3d0b8e556cdf778d7c090da1 /run_unittests.py
parentbd42cb965a1f2ef2927692bd75070404b951ea39 (diff)
downloadmeson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.zip
meson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.tar.gz
meson-a1a8772034aef90e8d58230d8bcfce54ab27bf6a.tar.bz2
Add test case to verify identity cross builds
A build with a cross file should always be identified as a cross build, even if the host and build machine are identical. This was the case in 0.50, regressed in 0.51, and is fixed again in 0.52, so add a test case to ensure it doesn't regress again.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index bdcfe3b..4da3a8f 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3687,6 +3687,16 @@ recommended as it is not supported on some platforms''')
out = self.run_target('clang-tidy')
self.assertIn('cttest.cpp:4:20', out)
+ def test_identity_cross(self):
+ testdir = os.path.join(self.unit_test_dir, '71 cross')
+ # Do a build to generate a cross file where the host is this target
+ self.init(testdir, extra_args=['-Dgenerate=true'])
+ self.meson_cross_file = os.path.join(self.builddir, "crossfile")
+ self.assertTrue(os.path.exists(self.meson_cross_file))
+ # Now verify that this is detected as cross
+ self.new_builddir()
+ self.init(testdir)
+
def test_introspect_buildoptions_without_configured_build(self):
testdir = os.path.join(self.unit_test_dir, '59 introspect buildoptions')
testfile = os.path.join(testdir, 'meson.build')