summaryrefslogtreecommitdiff
path: root/unittests/linuxcrosstests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-02-09 02:11:30 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-02-09 02:11:30 +0200
commitf11c643a82a911f8e9419557dae5d80af9aa3f92 (patch)
treeba6f22ae2342d3888fa1168759c5078f8c916ac2 /unittests/linuxcrosstests.py
parentd082204096afd51730f44a75bd02423f74c2e5ae (diff)
downloadmeson-crossenvvar.tar.gz
Properly error out when cross file is missing a compiler.crossenvvar
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 16f7c2454..0c0355a26 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())