validate: Fix wrong condition check when adding tests
authorVineeth T M <vineeth.tm@samsung.com>
Mon, 22 Feb 2016 02:49:48 +0000 (11:49 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Sat, 5 Mar 2016 11:56:14 +0000 (12:56 +0100)
When listing tests, checking whether uri is present or not and displaying error.
But uri does notneed to be present in case of pipeline generator. So the condition check is wrong.
This results in validateelements testsuite not working. Hence modifying the condition to
not error out on valid cases.

https://bugzilla.gnome.org/show_bug.cgi?id=762422

validate/launcher/apps/gstvalidate.py

index f0ad749..cf5740c 100644 (file)
@@ -593,11 +593,11 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
             scenarios = self.scenarios_manager.get_scenario(None)
         uris = self._list_uris()
 
-        if uris:
-            for generator in self.get_generators():
-                for test in generator.generate_tests(uris, scenarios):
-                    self.add_test(test)
-        else:
+        for generator in self.get_generators():
+            for test in generator.generate_tests(uris, scenarios):
+                self.add_test(test)
+
+        if not self.tests and not uris:
             printc("No valid uris present in the path. Check if media files and info files exist", Colors.FAIL)
 
         return self.tests