summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-03-24 09:10:29 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2023-03-28 00:36:37 +0300
commit42c4058304d8278fb96033a0ae9ce744c3632e66 (patch)
treece8e21446ae17673dd233ae2299ddf35a26a0bbc /unittests
parent567d1fec9b6f2191535509a5eae29436a024bd70 (diff)
downloadmeson-42c4058304d8278fb96033a0ae9ce744c3632e66.tar.gz
unittests: Pass the exact backend name
CI runs with vs2019 and we were passing --backend=vs. This fix reconfigure tests because we can't reconfigure with --backend=vs when initial configuration determined the backend is actually vs2019.
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py2
-rw-r--r--unittests/baseplatformtests.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 844f90907..c05cb339f 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -3460,7 +3460,7 @@ class AllPlatformTests(BasePlatformTests):
subsub : YES
User defined options
- backend : ''' + self.backend.name + '''
+ backend : ''' + self.backend_name + '''
libdir : lib
prefix : /usr
enabled_opt : enabled
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
index 9e55f6e60..9ab808394 100644
--- a/unittests/baseplatformtests.py
+++ b/unittests/baseplatformtests.py
@@ -55,8 +55,10 @@ class BasePlatformTests(TestCase):
src_root = str(PurePath(__file__).parents[1])
self.src_root = src_root
# Get the backend
- self.backend = getattr(Backend, os.environ['MESON_UNIT_TEST_BACKEND'])
- self.meson_args = ['--backend=' + self.backend.name]
+ self.backend_name = os.environ['MESON_UNIT_TEST_BACKEND']
+ backend_type = 'vs' if self.backend_name.startswith('vs') else self.backend_name
+ self.backend = getattr(Backend, backend_type)
+ self.meson_args = ['--backend=' + self.backend_name]
self.meson_native_files = []
self.meson_cross_files = []
self.meson_command = python_command + [get_meson_script()]