mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
validate:tools: Use the same semantic for all tests classnames
This commit is contained in:
parent
ac92d5b428
commit
d000ca62a4
3 changed files with 13 additions and 17 deletions
|
@ -207,7 +207,7 @@ class GESTestsManager(TestsManager):
|
||||||
else:
|
else:
|
||||||
projects.append(utils.path2url(proj))
|
projects.append(utils.path2url(proj))
|
||||||
|
|
||||||
SCENARIOS = ["none", "seek_forward", "seek_backward", "scrub_forward_seeking"]
|
SCENARIOS = ["play_15s", "seek_forward", "seek_backward", "scrub_forward_seeking"]
|
||||||
for proj in projects:
|
for proj in projects:
|
||||||
# First playback casses
|
# First playback casses
|
||||||
for scenario in SCENARIOS:
|
for scenario in SCENARIOS:
|
||||||
|
|
|
@ -32,6 +32,7 @@ from utils import MediaFormatCombination, get_profile,\
|
||||||
DEFAULT_GST_VALIDATE = "gst-validate-1.0"
|
DEFAULT_GST_VALIDATE = "gst-validate-1.0"
|
||||||
DEFAULT_GST_VALIDATE_TRANSCODING = "gst-validate-transcoding-1.0"
|
DEFAULT_GST_VALIDATE_TRANSCODING = "gst-validate-transcoding-1.0"
|
||||||
DISCOVERER_COMMAND = ["gst-validate-media-check-1.0"]
|
DISCOVERER_COMMAND = ["gst-validate-media-check-1.0"]
|
||||||
|
|
||||||
MEDIA_INFO_EXT = "media_info"
|
MEDIA_INFO_EXT = "media_info"
|
||||||
STREAM_INFO = "stream_info"
|
STREAM_INFO = "stream_info"
|
||||||
|
|
||||||
|
@ -138,14 +139,13 @@ class GstValidateManager(TestsManager, Loggable):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def list_tests(self):
|
def list_tests(self):
|
||||||
SCENARIOS = ["none", "simple_backward",
|
SCENARIOS = ["play_15s", "simple_backward",
|
||||||
"fast_forward", "seek_forward",
|
"fast_forward", "seek_forward",
|
||||||
"seek_backward", "scrub_forward_seeking"]
|
"seek_backward", "scrub_forward_seeking"]
|
||||||
|
|
||||||
for test_pipeline in PLAYBACK_TESTS:
|
for test_pipeline in PLAYBACK_TESTS:
|
||||||
name = "validate.playback"
|
|
||||||
for scenario in SCENARIOS:
|
for scenario in SCENARIOS:
|
||||||
self._add_playback_test(name, scenario, test_pipeline)
|
self._add_playback_test(scenario, test_pipeline)
|
||||||
|
|
||||||
for uri, mediainfo in self._list_uris():
|
for uri, mediainfo in self._list_uris():
|
||||||
classname = "validate.media_check.%s" % (os.path.splitext(os.path.basename(uri))[0].replace(".", "_"))
|
classname = "validate.media_check.%s" % (os.path.splitext(os.path.basename(uri))[0].replace(".", "_"))
|
||||||
|
@ -159,8 +159,9 @@ class GstValidateManager(TestsManager, Loggable):
|
||||||
if mediainfo.config.getboolean("media-info", "is-image") is True:
|
if mediainfo.config.getboolean("media-info", "is-image") is True:
|
||||||
continue
|
continue
|
||||||
for comb in COMBINATIONS:
|
for comb in COMBINATIONS:
|
||||||
classname = "validate.transcode.to_%s.%s" % (str(comb).replace(' ', '_'),
|
classname = "validate.%s.transcode.to_%s.%s" % (mediainfo.config.get("file-info", "protocol"),
|
||||||
os.path.splitext(os.path.basename(uri))[0].replace(".", "_"))
|
str(comb).replace(' ', '_'),
|
||||||
|
os.path.splitext(os.path.basename(uri))[0].replace(".", "_"))
|
||||||
self.tests.append(GstValidateTranscodingTest(classname,
|
self.tests.append(GstValidateTranscodingTest(classname,
|
||||||
self.options,
|
self.options,
|
||||||
self.reporter,
|
self.reporter,
|
||||||
|
@ -237,16 +238,13 @@ class GstValidateManager(TestsManager, Loggable):
|
||||||
|
|
||||||
return self._uris
|
return self._uris
|
||||||
|
|
||||||
def _get_fname(self, name, scenario, protocol=None):
|
def _get_fname(self, scenario, protocol=None):
|
||||||
if protocol is not None:
|
|
||||||
name = "%s.%s" % (name, protocol)
|
|
||||||
|
|
||||||
if scenario is not None and scenario.lower() != "none":
|
if scenario is not None and scenario.lower() != "none":
|
||||||
return "%s.%s" % (name, scenario)
|
return "%s.%s.%s.%s" % ("validate", protocol, "playback", scenario)
|
||||||
|
|
||||||
return name
|
return "%s.%s.%s" % ("validate", protocol, "playback")
|
||||||
|
|
||||||
def _add_playback_test(self, name, scenario, pipe):
|
def _add_playback_test(self, scenario, pipe):
|
||||||
if self.options.mute:
|
if self.options.mute:
|
||||||
if "autovideosink" in pipe:
|
if "autovideosink" in pipe:
|
||||||
pipe = pipe.replace("autovideosink", "fakesink")
|
pipe = pipe.replace("autovideosink", "fakesink")
|
||||||
|
@ -267,7 +265,7 @@ class GstValidateManager(TestsManager, Loggable):
|
||||||
# is run sync, otherwize some tests will fail
|
# is run sync, otherwize some tests will fail
|
||||||
npipe = pipe.replace("fakesink", "'fakesink sync=true'")
|
npipe = pipe.replace("fakesink", "'fakesink sync=true'")
|
||||||
|
|
||||||
fname = "%s.%s" % (self._get_fname(name, scenario,
|
fname = "%s.%s" % (self._get_fname(scenario,
|
||||||
minfo.config.get("file-info", "protocol")),
|
minfo.config.get("file-info", "protocol")),
|
||||||
os.path.basename(uri).replace(".", "_"))
|
os.path.basename(uri).replace(".", "_"))
|
||||||
self.debug("Adding: %s", fname)
|
self.debug("Adding: %s", fname)
|
||||||
|
@ -280,8 +278,7 @@ class GstValidateManager(TestsManager, Loggable):
|
||||||
file_infos=minfo.config)
|
file_infos=minfo.config)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.debug("Adding: %s", name)
|
self.tests.append(GstValidateLaunchTest(self._get_fname(scenario, "testing"),
|
||||||
self.tests.append(GstValidateLaunchTest(self._get_fname(fname, scenario),
|
|
||||||
self.options,
|
self.options,
|
||||||
self.reporter,
|
self.reporter,
|
||||||
pipe,
|
pipe,
|
||||||
|
|
|
@ -210,7 +210,6 @@ class GstValidateTest(Test):
|
||||||
if ret != "[":
|
if ret != "[":
|
||||||
ret += ", "
|
ret += ", "
|
||||||
error = l.split("critical : ")[1].replace("\n", '')
|
error = l.split("critical : ")[1].replace("\n", '')
|
||||||
print "%s -- %s" % (error, errors)
|
|
||||||
if error not in errors:
|
if error not in errors:
|
||||||
ret += error
|
ret += error
|
||||||
errors.append(error)
|
errors.append(error)
|
||||||
|
|
Loading…
Reference in a new issue