aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-04-06 08:00:59 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-09 23:11:05 +0530
commit7e4a67c7906ef736870650031f332a17be6673e6 (patch)
treeee03260975c419cae9d21b1437069966a85232f5 /run_tests.py
parent388e5a63dcfa855f662c247a0e81a1b2cd0946dd (diff)
downloadmeson-7e4a67c7906ef736870650031f332a17be6673e6.zip
meson-7e4a67c7906ef736870650031f332a17be6673e6.tar.gz
meson-7e4a67c7906ef736870650031f332a17be6673e6.tar.bz2
run_project_tests: Clean on backends that can't install
Also sets more groundwork for running unit tests with backends other that Ninja. Transferring global state to executors is totally broken in Python 3.4 so just serialize all the commands.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/run_tests.py b/run_tests.py
index f86c890..ebccaa6 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -22,6 +22,7 @@ import platform
from mesonbuild import mesonlib
from mesonbuild.environment import detect_ninja
from enum import Enum
+from glob import glob
Backend = Enum('Backend', 'ninja vs xcode')
@@ -30,6 +31,15 @@ if mesonlib.is_windows():
else:
exe_suffix = ''
+def get_backend_args_for_dir(backend, builddir):
+ '''
+ Visual Studio backend needs to be given the solution to build
+ '''
+ if backend.startswith('vs'):
+ sln_name = glob(os.path.join(builddir, '*.sln'))[0]
+ return [os.path.split(sln_name)[-1]]
+ return []
+
def get_build_target_args(backend, target):
if target is None:
return []
@@ -44,7 +54,7 @@ def get_backend_commands(backend, debug=False):
uninstall_cmd = []
if backend.startswith('vs'):
cmd = ['msbuild']
- clean_cmd = []
+ clean_cmd = cmd + ['/target:Clean']
test_cmd = cmd + ['RUN_TESTS.vcxproj']
elif backend == 'xcode':
cmd = ['xcodebuild']