gst-env: Prematurely skip all targets that aren't installed

Simplifies the code a bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/180>
This commit is contained in:
Nirbheek Chauhan 2020-07-23 16:05:06 +05:30 committed by GStreamer Merge Bot
parent 84bd496035
commit beeec59a01

View file

@ -80,8 +80,6 @@ def is_library_target_and_not_plugin(target, filename):
'''
if not target['type'].startswith('shared'):
return False
if not target['installed']:
return False
# Check if this output of that target is a shared library
if not SHAREDLIB_REG.search(filename):
return False
@ -104,8 +102,6 @@ def is_library_target_and_not_plugin(target, filename):
def is_binary_target_and_in_path(target, filename, bindir):
if target['type'] != 'executable':
return False
if not target['installed']:
return False
# Check if this file installed by this target is installed to bindir
for install_filename in listify(target['install_filename']):
if install_filename.endswith(os.path.basename(filename)):
@ -282,6 +278,8 @@ def get_subprocess_env(options, gst_version):
for target in targets:
filenames = listify(target['filename'])
if not target['installed']:
continue
for filename in filenames:
root = os.path.dirname(filename)
if srcdir_path / "subprojects/gst-devtools/validate/plugins" in (srcdir_path / root).parents: