aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-08 09:17:19 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-09 23:11:36 +0530
commitf80d471345e0ece943819ae79e4d85e645e2d1a7 (patch)
tree96e62ca69379fc275e03566bc937c6923b006b62 /run_unittests.py
parenta331bf1162030c9aedc3b9ad33350fe28b7c35db (diff)
downloadmeson-f80d471345e0ece943819ae79e4d85e645e2d1a7.zip
meson-f80d471345e0ece943819ae79e4d85e645e2d1a7.tar.gz
meson-f80d471345e0ece943819ae79e4d85e645e2d1a7.tar.bz2
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.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py6
1 files changed, 3 insertions, 3 deletions
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]