aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2018-11-27 15:11:47 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-01-06 12:19:27 +0100
commit111e596200ac613f9e50a05d60410604fdd0ca61 (patch)
treeca41ffef04a78a5d71127378adf1fd8323f84b9f /mesonbuild
parentf4285f350e1acf6ffe10a6dafff4028c0d142924 (diff)
downloadmeson-111e596200ac613f9e50a05d60410604fdd0ca61.zip
meson-111e596200ac613f9e50a05d60410604fdd0ca61.tar.gz
meson-111e596200ac613f9e50a05d60410604fdd0ca61.tar.bz2
Fixed tests and benchmarks
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/backends.py7
-rw-r--r--mesonbuild/mintro.py4
-rw-r--r--mesonbuild/msetup.py7
3 files changed, 12 insertions, 6 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index bf83ab1..8cc6f2f 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -683,7 +683,7 @@ class Backend:
def write_test_file(self, datafile):
self.write_test_serialisation(self.build.get_tests(), datafile)
- def write_test_serialisation(self, tests, datafile):
+ def create_test_serialisation(self, tests):
arr = []
for t in tests:
exe = t.get_exe()
@@ -730,7 +730,10 @@ class Backend:
exe_wrapper, t.is_parallel, cmd_args, t.env,
t.should_fail, t.timeout, t.workdir, extra_paths)
arr.append(ts)
- pickle.dump(arr, datafile)
+ return arr
+
+ def write_test_serialisation(self, tests, datafile):
+ pickle.dump(self.create_test_serialisation(tests), datafile)
def generate_depmf_install(self, d):
if self.build.dep_manifest_name is None:
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index 2f8b3f3..5ab1d1f 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -645,14 +645,14 @@ def run(options):
def generate_introspection_file(coredata, builddata, testdata, benchmarkdata, installdata):
intro_info = [
- #list_benchmarks(benchmarkdata),
+ list_benchmarks(benchmarkdata),
list_buildoptions(coredata, builddata),
list_buildsystem_files(builddata),
list_deps(coredata),
list_installed(installdata),
list_projinfo(builddata),
list_targets(coredata, builddata, installdata),
- #list_tests(testdata)
+ list_tests(testdata)
]
outdict = {}
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
index 10eecd8..d5709f1 100644
--- a/mesonbuild/msetup.py
+++ b/mesonbuild/msetup.py
@@ -217,8 +217,11 @@ class MesonApp:
else:
coredata.update_cmd_line_file(self.build_dir, self.options)
- # Generate an IDE introspection file with the exact same syntax as the introspection API defined in mintro
- mintro.generate_introspection_file(b.environment.get_coredata(), b, b.get_tests(), b.get_benchmarks(), intr.backend.create_install_data())
+ # Generate an IDE introspection file with the same syntax as the already existing API
+ intro_tests = intr.backend.create_test_serialisation(b.get_tests())
+ intro_benchmarks = intr.backend.create_test_serialisation(b.get_benchmarks())
+ intro_install = intr.backend.create_install_data()
+ mintro.generate_introspection_file(b.environment.get_coredata(), b, intro_tests, intro_benchmarks, intro_install)
except:
if 'cdf' in locals():
old_cdf = cdf + '.prev'