diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-10-16 20:01:03 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-18 22:04:29 +0200 |
commit | 951262d7590343ffa9730666c427ad9d708a9fb6 (patch) | |
tree | d0ec82ffcf41ae5f30840c35a74d4da02dd26381 | |
parent | a5a4c85eca95a31547e94d220c0e1a5ce4adf22d (diff) | |
download | meson-951262d7590343ffa9730666c427ad9d708a9fb6.zip meson-951262d7590343ffa9730666c427ad9d708a9fb6.tar.gz meson-951262d7590343ffa9730666c427ad9d708a9fb6.tar.bz2 |
Removed Valgrind from core.
-rw-r--r-- | mesonbuild/backend/backends.py | 5 | ||||
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 15 | ||||
-rw-r--r-- | mesonbuild/coredata.py | 2 | ||||
-rw-r--r-- | mesonbuild/environment.py | 6 | ||||
-rw-r--r-- | mesonbuild/interpreter.py | 13 | ||||
-rwxr-xr-x | mesonbuild/scripts/meson_test.py | 5 | ||||
-rwxr-xr-x | mesontest.py | 2 |
7 files changed, 8 insertions, 40 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index b82227f..c37ae2a 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -50,7 +50,7 @@ class ExecutableSerialisation(): class TestSerialisation: def __init__(self, name, suite, fname, is_cross, exe_wrapper, is_parallel, cmd_args, env, - should_fail, valgrind_args, timeout, workdir, extra_paths): + should_fail, timeout, workdir, extra_paths): self.name = name self.suite = suite self.fname = fname @@ -60,7 +60,6 @@ class TestSerialisation: self.cmd_args = cmd_args self.env = env self.should_fail = should_fail - self.valgrind_args = valgrind_args self.timeout = timeout self.workdir = workdir self.extra_paths = extra_paths @@ -443,7 +442,7 @@ class Backend(): a = os.path.join(self.environment.get_build_dir(), a.rel_to_builddir(self.build_to_src)) cmd_args.append(a) ts = TestSerialisation(t.get_name(), t.suite, fname, is_cross, exe_wrapper, - t.is_parallel, cmd_args, t.env, t.should_fail, t.valgrind_args, + t.is_parallel, cmd_args, t.env, t.should_fail, t.timeout, t.workdir, extra_paths) arr.append(ts) pickle.dump(arr, datafile) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index fa4d5cf..b0a2201 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -142,7 +142,6 @@ class NinjaBackend(backends.Backend): self.ninja_filename = 'build.ninja' self.fortran_deps = {} self.all_outputs = {} - self.valgrind = environment.find_valgrind() def detect_vs_dep_prefix(self, tempfilename): '''VS writes its dependency in a locale dependent format. @@ -728,13 +727,6 @@ int dummy; elem.add_item('pool', 'console') elem.write(outfile) - if self.valgrind: - velem = NinjaBuildElement(self.all_outputs, 'test-valgrind:' + s, 'CUSTOM_COMMAND', ['all', 'PHONY']) - velem.add_item('COMMAND', cmd + ['--wrapper=' + self.valgrind, '--suite=' + s]) - velem.add_item('DESC', 'Running test suite %s under Valgrind.' % visible_name) - velem.add_item('pool', 'console') - velem.write(outfile) - def generate_tests(self, outfile): (test_data, benchmark_data) = self.serialise_tests() script_root = self.environment.get_script_dir() @@ -751,13 +743,6 @@ int dummy; elem.write(outfile) self.write_test_suite_targets(cmd, outfile) - if self.valgrind: - velem = NinjaBuildElement(self.all_outputs, 'test-valgrind', 'CUSTOM_COMMAND', ['all', 'PHONY']) - velem.add_item('COMMAND', cmd + ['--wrapper=' + self.valgrind]) - velem.add_item('DESC', 'Running test suite under Valgrind.') - velem.add_item('pool', 'console') - velem.write(outfile) - # And then benchmarks. cmd = [sys.executable, self.environment.get_build_command(), '--internal', 'benchmark', benchmark_data] elem = NinjaBuildElement(self.all_outputs, 'benchmark', 'CUSTOM_COMMAND', ['all', 'PHONY']) diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 0894f9a..29ea1bf 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -241,8 +241,6 @@ forbidden_target_names = {'clean': None, 'all': None, 'test': None, 'test:': None, - 'test-valgrind': None, - 'test-valgrind:': None, 'benchmark': None, 'install': None, 'build.ninja': None, diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 405685c..cc62010 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -39,12 +39,6 @@ def find_coverage_tools(): genhtml_exe = None return (gcovr_exe, lcov_exe, genhtml_exe) -def find_valgrind(): - valgrind_exe = 'valgrind' - if not mesonlib.exe_exists([valgrind_exe, '--version']): - valgrind_exe = None - return valgrind_exe - def detect_ninja(): for n in ['ninja', 'ninja-build']: try: diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 6becdb6..235d55a 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -614,7 +614,7 @@ class RunTargetHolder(InterpreterObject): self.held_object = build.RunTarget(name, command, args, dependencies, subdir) class Test(InterpreterObject): - def __init__(self, name, suite, exe, is_parallel, cmd_args, env, should_fail, valgrind_args, timeout, workdir): + def __init__(self, name, suite, exe, is_parallel, cmd_args, env, should_fail, timeout, workdir): InterpreterObject.__init__(self) self.name = name self.suite = suite @@ -623,7 +623,6 @@ class Test(InterpreterObject): self.cmd_args = cmd_args self.env = env self.should_fail = should_fail - self.valgrind_args = valgrind_args self.timeout = timeout self.workdir = workdir @@ -2128,12 +2127,8 @@ requirements use the version keyword argument instead.''') if ' ' in k: raise InterpreterException('Env var key must not have spaces in it.') env[k] = val - valgrind_args = kwargs.get('valgrind_args', []) - if not isinstance(valgrind_args, list): - valgrind_args = [valgrind_args] - for a in valgrind_args: - if not isinstance(a, str): - raise InterpreterException('Valgrind_arg not a string.') + if not isinstance(envlist, list): + envlist = [envlist] should_fail = kwargs.get('should_fail', False) if not isinstance(should_fail, bool): raise InterpreterException('Keyword argument should_fail must be a boolean.') @@ -2156,7 +2151,7 @@ requirements use the version keyword argument instead.''') s = '.' + s newsuite.append(self.subproject.replace(' ', '_').replace('.', '_') + s) suite = newsuite - t = Test(args[0], suite, args[1].held_object, par, cmd_args, env, should_fail, valgrind_args, timeout, workdir) + t = Test(args[0], suite, args[1].held_object, par, cmd_args, env, should_fail, timeout, workdir) if is_base_test: self.build.tests.append(t) mlog.debug('Adding test "', mlog.bold(args[0]), '".', sep='') diff --git a/mesonbuild/scripts/meson_test.py b/mesonbuild/scripts/meson_test.py index 8034815..3d0d957 100755 --- a/mesonbuild/scripts/meson_test.py +++ b/mesonbuild/scripts/meson_test.py @@ -123,10 +123,7 @@ def run_single_test(wrap, test): stde = None returncode = -1 else: - if len(wrap) > 0 and 'valgrind' in wrap[0]: - cmd = wrap + test.valgrind_args + cmd + test.cmd_args - else: - cmd = wrap + cmd + test.cmd_args + cmd = wrap + cmd + test.cmd_args starttime = time.time() child_env = os.environ.copy() if isinstance(test.env, build.EnvironmentVariables): diff --git a/mesontest.py b/mesontest.py index 6fda88d..3ab8ef3 100755 --- a/mesontest.py +++ b/mesontest.py @@ -17,7 +17,7 @@ # A tool to run tests in many different ways. import subprocess, sys, os, argparse -import pickle, statistics, json +import pickle from mesonbuild.scripts import meson_test parser = argparse.ArgumentParser() |