From 42c4058304d8278fb96033a0ae9ce744c3632e66 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 24 Mar 2023 09:10:29 -0400 Subject: 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. --- unittests/baseplatformtests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'unittests/baseplatformtests.py') diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py index 9e55f6e..9ab8083 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()] -- cgit v1.1