global last_carriage_return_len
if title or title_char:
length = 0
- for l in message.split("\n"):
- if len(l) > length:
- length = len(l)
+ for line in message.split("\n"):
+ if len(line) > length:
+ length = len(line)
if length == 0:
length = len(message)
# in that case.
pass
- for l in res.split('\n'):
- if "Duration: " in l:
- duration = parse_gsttimeargs(l.replace("Duration: ", ""))
+ for line in res.split('\n'):
+ if "Duration: " in line:
+ duration = parse_gsttimeargs(line.replace("Duration: ", ""))
break
return duration
return get_gst_build_valgrind_suppressions.data
for suppression_path in ["gstreamer/tests/check/gstreamer.supp",
- "gst-plugins-base/tests/check/gst-plugins-base.supp",
- "gst-plugins-good/tests/check/gst-plugins-good.supp",
- "gst-plugins-bad/tests/check/gst-plugins-bad.supp",
- "gst-plugins-ugly/tests/check/gst-plugins-ugly.supp",
- "gst-libav/tests/check/gst-libav.supp",
- "gst-devtools/validate/data/gstvalidate.supp",
- "libnice/tests/libnice.supp",
- "libsoup/tests/libsoup.supp",
- "glib/glib.supp",
- "gst-python/testsuite/gstpython.supp",
- "gst-python/testsuite/python.supp",
+ "gst-plugins-base/tests/check/gst-plugins-base.supp",
+ "gst-plugins-good/tests/check/gst-plugins-good.supp",
+ "gst-plugins-bad/tests/check/gst-plugins-bad.supp",
+ "gst-plugins-ugly/tests/check/gst-plugins-ugly.supp",
+ "gst-libav/tests/check/gst-libav.supp",
+ "gst-devtools/validate/data/gstvalidate.supp",
+ "libnice/tests/libnice.supp",
+ "libsoup/tests/libsoup.supp",
+ "glib/glib.supp",
+ "gst-python/testsuite/gstpython.supp",
+ "gst-python/testsuite/python.supp",
]:
suppression = os.path.join(config.SRCDIR, "subprojects", suppression_path)
if os.path.exists(suppression):
else:
newer_than = time.strftime("%a %Y-%m-%d %H:%M:%S %Z", time.localtime(test._starting_time))
coredumpctl = self.coredumpctl + ['info', os.path.basename(test.command[0]),
- '--since', newer_than]
+ '--since', newer_than]
try:
info = subprocess.check_output(coredumpctl, stderr=subprocess.STDOUT)
try:
with tempfile.NamedTemporaryFile() as stderr:
coredump = subprocess.check_output(self.coredumpctl + ['dump', pid],
- stderr=stderr)
+ stderr=stderr)
with tempfile.NamedTemporaryFile() as tf:
tf.write(coredump)
components = [c for c in url.path.split('/') if c]
if len(components) not in [4, 5]:
printc("\n + %s \n --> bug: %s\n --> Status: Not a proper gitlab report" % (regex, bug),
- Colors.WARNING)
+ Colors.WARNING)
continue
project_id = components[0] + '%2F' + components[1]
issue_id = int(components[-1])
test_name.replace('.', os.sep))
actual_results_dir = os.path.join(extra_vars['validate-flow-actual-results-dir'],
test_name.replace('.', os.sep))
- extra_vars['validateflow'] = "validateflow, expectations-dir=\"%s\", actual-results-dir=\"%s\"" % (expectations_dir, actual_results_dir)
+ extra_vars['validateflow'] = "validateflow, expectations-dir=\"%s\", actual-results-dir=\"%s\"" % (
+ expectations_dir, actual_results_dir)
if 'ssim-results-dir' in extra_vars:
ssim_results = extra_vars['ssim-results-dir']
class InvalidValueError(ValueError):
"""Received value is invalid"""
+
def __init__(self, name, value, expect):
ValueError.__init__(
self, "Invalid value {!r} for {}. Expect {}.".format(
if type_is_unknown:
self._check_unknown_typed_value(value)
warning('GstStructure',
- "The GstStructure type {} with the value ({}) is "
- "unknown. The value will be stored and serialized as "
- "given.".format(_type, value))
+ "The GstStructure type {} with the value ({}) is "
+ "unknown. The value will be stored and serialized as "
+ "given.".format(_type, value))
_type = self._make_type_unknown(_type)
self.fields[key] = (_type, value)
value = self.get_value(key)
return value
warning('GstStructure',
- "The structure {} contains a value under {}, but is "
- "a {}, rather than the expected {} type".format(
- self.name, key, type_name, expect_type))
+ "The structure {} contains a value under {}, but is "
+ "a {}, rather than the expected {} type".format(
+ self.name, key, type_name, expect_type))
return default
def values(self):
# prevent printing on subsequent calls if we find a
# list within a list, etc.
warning('GstStructure',
- "GstStructure received a range/list/array of type "
- "{}, which can not be deserialized. Storing the "
- "value as {}.".format(_type, value))
+ "GstStructure received a range/list/array of type "
+ "{}, which can not be deserialized. Storing the "
+ "value as {}.".format(_type, value))
else:
match = cls.FIELD_VALUE_REGEX.match(read)
if match is None:
"({!s})".format(err))
else:
warning('GstStructure',
- "GstStructure found a type {} that is unknown. "
- "The corresponding value ({}) will not be "
- "deserialized and will be stored as given."
- "".format(_type, value))
+ "GstStructure found a type {} that is unknown. "
+ "The corresponding value ({}) will not be "
+ "deserialized and will be stored as given."
+ "".format(_type, value))
if type_is_unknown and _type is not None:
_type = cls._make_type_unknown(_type)
return _type, value, read
# see GST_ASCII_IS_STRING in gst_private.h
GST_ASCII_CHARS = [
- ord(l) for l in "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789"
- "_-+/:."
+ ord(line) for line in "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789"
+ "_-+/:."
]
- LEADING_OCTAL_CHARS = [ord(l) for l in "0123"]
- OCTAL_CHARS = [ord(l) for l in "01234567"]
+ LEADING_OCTAL_CHARS = [ord(line) for line in "0123"]
+ OCTAL_CHARS = [ord(line) for line in "01234567"]
@classmethod
def serialize_string(cls, value):
"""
Mimicking a GstCapsFeatures.
"""
+
def __init__(self, *features):
"""
Initialize the GstCapsFeatures.