diff options
Diffstat (limited to 'tests/check/getpluginsdir')
-rw-r--r-- | tests/check/getpluginsdir | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/check/getpluginsdir b/tests/check/getpluginsdir new file mode 100644 index 0000000..102e3c8 --- /dev/null +++ b/tests/check/getpluginsdir @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +import os +import sys +import subprocess + +builddir = os.environ['MESON_BUILD_ROOT'] + +res = '' +args = sys.argv[1:] +for i in range(0, len(args), 2): + project = args[i] + pkg_name = args[i + 1] + path = os.path.join(builddir, 'subprojects', project) + if os.path.exists(path): + res += ':' + path + else: + try: + res += ':' + subprocess.check_output(['pkg-config', + '--variable=pluginsdir', + pkg_name]).decode() + except subprocess.CalledProcessError: + exit(1) + +print(res.strip(":")) |