aboutsummaryrefslogtreecommitdiff
path: root/mesonintrospect.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-12-03 00:28:52 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-12-03 00:28:52 +0200
commitf7608fc56941e81e18647de00591ba23050c5f7b (patch)
tree392bd3d5f0935ddde13b0610676f97e07fbe20a9 /mesonintrospect.py
parent913963d608a419a336473203c3167987f8c15060 (diff)
parentb167f3a56f2f21f5dab284463e3be15a201738b2 (diff)
downloadmeson-f7608fc56941e81e18647de00591ba23050c5f7b.zip
meson-f7608fc56941e81e18647de00591ba23050c5f7b.tar.gz
meson-f7608fc56941e81e18647de00591ba23050c5f7b.tar.bz2
Merge pull request #317 from mesonbuild/benchmark
Create benchmark feature
Diffstat (limited to 'mesonintrospect.py')
-rwxr-xr-xmesonintrospect.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/mesonintrospect.py b/mesonintrospect.py
index 3ef2ab5..f6d1f14 100755
--- a/mesonintrospect.py
+++ b/mesonintrospect.py
@@ -37,6 +37,8 @@ parser.add_argument('--buildoptions', action='store_true', dest='buildoptions',
help='List all build options.')
parser.add_argument('--tests', action='store_true', dest='tests', default=False,
help='List all unit tests.')
+parser.add_argument('--benchmarks', action='store_true', dest='benchmarks', default=False,
+ help='List all benchmarks.')
parser.add_argument('--dependencies', action='store_true', dest='dependencies', default=False,
help='list external dependencies.')
parser.add_argument('args', nargs='+')
@@ -157,7 +159,11 @@ def list_tests(testdata):
result = []
for t in testdata:
to = {}
- to['cmd'] = [t.fname] + t.cmd_args
+ if isinstance(t.fname, str):
+ fname = [t.fname]
+ else:
+ fname = t.fname
+ to['cmd'] = fname + t.cmd_args
to['env'] = t.env
to['name'] = t.name
result.append(to)
@@ -175,9 +181,11 @@ if __name__ == '__main__':
corefile = os.path.join(bdir, 'meson-private/coredata.dat')
buildfile = os.path.join(bdir, 'meson-private/build.dat')
testfile = os.path.join(bdir, 'meson-private/meson_test_setup.dat')
+ benchmarkfile = os.path.join(bdir, 'meson-private/meson_benchmark_setup.dat')
coredata = pickle.load(open(corefile, 'rb'))
builddata = pickle.load(open(buildfile, 'rb'))
testdata = pickle.load(open(testfile, 'rb'))
+ benchmarkdata = pickle.load(open(benchmarkfile, 'rb'))
if options.list_targets:
list_targets(coredata, builddata)
elif options.target_files is not None:
@@ -188,6 +196,8 @@ if __name__ == '__main__':
list_buildoptions(coredata, builddata)
elif options.tests:
list_tests(testdata)
+ elif options.benchmarks:
+ list_tests(benchmarkdata)
elif options.dependencies:
list_deps(coredata)
else: