diff options
author | Vineeth T M <vineeth.tm@samsung.com> | 2015-10-05 13:38:10 +0900 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-11-11 10:12:58 +0100 |
commit | 0f7105d317328808272e554a9a138b5c8b47dc68 (patch) | |
tree | 34004dccbf9e4ff6fb92e66d5224d65be74d2b83 | |
parent | d57fca241a69bccd38241a8f8c6216d2f237bed1 (diff) |
validate: launcher: Print error when media-info files not present
When there are no media-info files present and --generate-media-info
option is not given, then it just fails without printing error.
Printing an error stating, use --generate-media-info if there are no
media info files.
When there are neither media files and media info files, print error
stating the same
https://bugzilla.gnome.org/show_bug.cgi?id=755087
-rw-r--r-- | validate/launcher/apps/gstvalidate.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/validate/launcher/apps/gstvalidate.py b/validate/launcher/apps/gstvalidate.py index 701b9ac..6659322 100644 --- a/validate/launcher/apps/gstvalidate.py +++ b/validate/launcher/apps/gstvalidate.py @@ -593,9 +593,12 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""") scenarios = self.scenarios_manager.get_scenario(None) uris = self._list_uris() - for generator in self.get_generators(): - for test in generator.generate_tests(uris, scenarios): - self.add_test(test) + if uris: + for generator in self.get_generators(): + for test in generator.generate_tests(uris, scenarios): + self.add_test(test) + else: + printc("No valid uris present in the path. Check if media files and info files exist", Colors.FAIL) return self.tests @@ -642,8 +645,10 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""") self._add_media(fpath) return True elif not self.options.generate_info and not self.options.update_media_info and not self.options.validate_uris: + self.info("%s not present. Use --generate-media-info", media_info) return True elif self.options.update_media_info and not os.path.isfile(media_info): + self.info("%s not present. Use --generate-media-info", media_info) return True media_descriptor = GstValidateMediaDescriptor.new_from_uri( |