mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-01 08:12:30 +00:00
validate: launcher: Make encoding extra check use common code path
Reusing the reporting infrastructure instead of shurtcuting it
This commit is contained in:
parent
8a6ee4841b
commit
562750213f
2 changed files with 38 additions and 19 deletions
|
@ -680,13 +680,8 @@ class GstValidateTranscodingTest(GstValidateTest, GstValidateEncodingTestInterfa
|
||||||
return size
|
return size
|
||||||
|
|
||||||
def check_results(self):
|
def check_results(self):
|
||||||
if self.result in [Result.FAILED, Result.TIMEOUT] or \
|
self.check_encoded_file()
|
||||||
self.process.returncode != 0:
|
|
||||||
GstValidateTest.check_results(self)
|
GstValidateTest.check_results(self)
|
||||||
return
|
|
||||||
|
|
||||||
res, msg = self.check_encoded_file()
|
|
||||||
self.set_result(res, msg)
|
|
||||||
|
|
||||||
|
|
||||||
class GstValidateBaseRTSPTest:
|
class GstValidateBaseRTSPTest:
|
||||||
|
|
|
@ -1287,10 +1287,17 @@ class GstValidateEncodingTestInterface(object):
|
||||||
|
|
||||||
if orig_duration - tolerance >= duration <= orig_duration + tolerance:
|
if orig_duration - tolerance >= duration <= orig_duration + tolerance:
|
||||||
os.remove(result_descriptor.get_path())
|
os.remove(result_descriptor.get_path())
|
||||||
return (Result.FAILED, "Duration of encoded file is "
|
self.add_report(
|
||||||
" wrong (%s instead of %s)" %
|
{
|
||||||
(utils.TIME_ARGS(duration),
|
'type': 'report',
|
||||||
utils.TIME_ARGS(orig_duration)))
|
'issue-id': 'transcoded-file-wrong-duration',
|
||||||
|
'summary': 'The duration of a transcoded file doesn\'t match the duration of the original file',
|
||||||
|
'level': 'critical',
|
||||||
|
'detected-on': 'pipeline',
|
||||||
|
'details': "Duration of encoded file is " " wrong (%s instead of %s)" % (
|
||||||
|
utils.TIME_ARGS(duration), utils.TIME_ARGS(orig_duration))
|
||||||
|
}
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
all_tracks_caps = result_descriptor.get_tracks_caps()
|
all_tracks_caps = result_descriptor.get_tracks_caps()
|
||||||
container_caps = result_descriptor.get_caps()
|
container_caps = result_descriptor.get_caps()
|
||||||
|
@ -1304,21 +1311,38 @@ class GstValidateEncodingTestInterface(object):
|
||||||
|
|
||||||
if wanted_caps is None:
|
if wanted_caps is None:
|
||||||
os.remove(result_descriptor.get_path())
|
os.remove(result_descriptor.get_path())
|
||||||
return (Result.FAILED,
|
self.add_report(
|
||||||
"Found a track of type %s in the encoded files"
|
{
|
||||||
" but none where wanted in the encoded profile: %s"
|
'type': 'report',
|
||||||
% (track_type, self.combination))
|
'issue-id': 'transcoded-file-wrong-stream-type',
|
||||||
|
'summary': 'Expected stream types during transcoding do not match expectations',
|
||||||
|
'level': 'critical',
|
||||||
|
'detected-on': 'pipeline',
|
||||||
|
'details': "Found a track of type %s in the encoded files"
|
||||||
|
" but none where wanted in the encoded profile: %s" % (
|
||||||
|
track_type, self.combination)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
for c in cwanted_caps:
|
for c in cwanted_caps:
|
||||||
if c not in ccaps:
|
if c not in ccaps:
|
||||||
if not self._has_caps_type_variant(c, ccaps):
|
if not self._has_caps_type_variant(c, ccaps):
|
||||||
os.remove(result_descriptor.get_path())
|
os.remove(result_descriptor.get_path())
|
||||||
return (Result.FAILED,
|
self.add_report(
|
||||||
"Field: %s (from %s) not in caps of the outputed file %s"
|
{
|
||||||
% (wanted_caps, c, ccaps))
|
'type': 'report',
|
||||||
|
'issue-id': 'transcoded-file-wrong-caps',
|
||||||
|
'summary': 'Expected stream caps during transcoding do not match expectations',
|
||||||
|
'level': 'critical',
|
||||||
|
'detected-on': 'pipeline',
|
||||||
|
'details': "Field: %s (from %s) not in caps of the outputed file %s" % (
|
||||||
|
wanted_caps, c, ccaps)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
os.remove(result_descriptor.get_path())
|
os.remove(result_descriptor.get_path())
|
||||||
return (Result.PASSED, "")
|
|
||||||
|
|
||||||
|
|
||||||
class TestsManager(Loggable):
|
class TestsManager(Loggable):
|
||||||
|
|
Loading…
Reference in a new issue