aboutsummaryrefslogtreecommitdiff
path: root/unittests/linuxcrosstests.py
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/linuxcrosstests.py')
-rw-r--r--unittests/linuxcrosstests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/linuxcrosstests.py b/unittests/linuxcrosstests.py
index 16f7c24..0c0355a 100644
--- a/unittests/linuxcrosstests.py
+++ b/unittests/linuxcrosstests.py
@@ -125,6 +125,14 @@ class LinuxCrossArmTests(BaseLinuxCrossTests):
self.run_tests()
self.assertPathExists(stamp_file)
+ def test_missing_compilers(self):
+ '''
+ Requesting a compiler that is not in the cross file must be an error.
+ '''
+ testdir = os.path.join(self.common_test_dir, '1 trivial')
+ self.meson_cross_files = [os.path.join(self.src_root, 'cross', 'noexes.txt')]
+ with self.assertRaises(subprocess.CalledProcessError, msg='compiler binary not defined in a cross file'):
+ self.init(testdir)
def should_run_cross_mingw_tests():
return shutil.which('x86_64-w64-mingw32-gcc') and not (is_windows() or is_cygwin())