aboutsummaryrefslogtreecommitdiff
path: root/unittests/linuxcrosstests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-01-28 14:59:33 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2022-01-30 02:13:42 +0530
commit2512c25c0bb3649c4cc8be20ac30d59630241ae4 (patch)
treee3d7ec5c29f28a3fd2860951c15d692e0294c14d /unittests/linuxcrosstests.py
parent029652ecb5da390ff3acc71ab98c9d53b2aa1a12 (diff)
downloadmeson-2512c25c0bb3649c4cc8be20ac30d59630241ae4.zip
meson-2512c25c0bb3649c4cc8be20ac30d59630241ae4.tar.gz
meson-2512c25c0bb3649c4cc8be20ac30d59630241ae4.tar.bz2
ninja backend: Fix usage of same constants file for native and cross
For example: ``` meson builddir \ --native-file vs2019-paths.txt \ --native-file vs2019-win-x64.txt \ --cross-file vs2019-paths.txt \ --cross-file vs2019-win-arm64.txt ``` This was causing the error: > ERROR: Multiple producers for Ninja target "/path/to/vs2019-paths.txt". Please rename your targets. Fix it by using a set() when generating the list of regen files, and add a test for it too.
Diffstat (limited to 'unittests/linuxcrosstests.py')
-rw-r--r--unittests/linuxcrosstests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/linuxcrosstests.py b/unittests/linuxcrosstests.py
index b3eecc8..16f7c24 100644
--- a/unittests/linuxcrosstests.py
+++ b/unittests/linuxcrosstests.py
@@ -44,7 +44,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests):
def setUp(self):
super().setUp()
- self.meson_cross_file = os.path.join(self.src_root, 'cross', 'ubuntu-armhf.txt')
+ self.meson_cross_files = [os.path.join(self.src_root, 'cross', 'ubuntu-armhf.txt')]
def test_cflags_cross_environment_pollution(self):
'''
@@ -66,7 +66,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests):
https://github.com/mesonbuild/meson/issues/3089
'''
testdir = os.path.join(self.unit_test_dir, '33 cross file overrides always args')
- self.meson_cross_file = os.path.join(testdir, 'ubuntu-armhf-overrides.txt')
+ self.meson_cross_files = [os.path.join(testdir, 'ubuntu-armhf-overrides.txt')]
self.init(testdir)
compdb = self.get_compdb()
self.assertRegex(compdb[0]['command'], '-D_FILE_OFFSET_BITS=64.*-U_FILE_OFFSET_BITS')
@@ -137,7 +137,7 @@ class LinuxCrossMingwTests(BaseLinuxCrossTests):
def setUp(self):
super().setUp()
- self.meson_cross_file = os.path.join(self.src_root, 'cross', 'linux-mingw-w64-64bit.txt')
+ self.meson_cross_files = [os.path.join(self.src_root, 'cross', 'linux-mingw-w64-64bit.txt')]
def test_exe_wrapper_behaviour(self):
'''
@@ -154,7 +154,7 @@ class LinuxCrossMingwTests(BaseLinuxCrossTests):
self.wipe()
os.mkdir(self.builddir)
# Change cross file to use a non-existing exe_wrapper and it should fail
- self.meson_cross_file = os.path.join(testdir, 'broken-cross.txt')
+ self.meson_cross_files = [os.path.join(testdir, 'broken-cross.txt')]
# Force tracebacks so we can detect them properly
env = {'MESON_FORCE_BACKTRACE': '1'}
error_message = "An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH."