validate: Fix wrong condition check when adding tests

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
This commit is contained in:
Vineeth T M 2016-02-22 11:49:48 +09:00 committed by Thibault Saunier
parent 6a0170709c
commit 7d9e9b3b79

View 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