From f80d471345e0ece943819ae79e4d85e645e2d1a7 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 8 Apr 2017 09:17:19 +0530 Subject: unit tests: Fix running specific targets with MSBuild /t:targetname syntax doesn't work, but running the vcxproj does work Also use the Backend enum everywhere. --- run_unittests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index f7ac140..0c7d6c0 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -29,7 +29,7 @@ from mesonbuild.environment import Environment from mesonbuild.dependencies import PkgConfigDependency, ExternalProgram from run_tests import exe_suffix, get_fake_options, FakeEnvironment -from run_tests import get_builddir_target_args, get_backend_commands +from run_tests import get_builddir_target_args, get_backend_commands, Backend def get_soname(fname): @@ -332,9 +332,9 @@ class BasePlatformTests(unittest.TestCase): self.installdir = os.path.join(self.builddir, 'install') # Get the backend # FIXME: Extract this from argv? - self.backend = os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja') + self.backend = getattr(Backend, os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja')) self.meson_command = [sys.executable, os.path.join(src_root, 'meson.py'), - '--backend=' + self.backend] + '--backend=' + self.backend.name] self.mconf_command = [sys.executable, os.path.join(src_root, 'mesonconf.py')] self.mintro_command = [sys.executable, os.path.join(src_root, 'mesonintrospect.py')] self.mtest_command = [sys.executable, os.path.join(src_root, 'mesontest.py'), '-C', self.builddir] -- cgit v1.1