Commit e1d1aa7b authored by Ivan Tyagov's avatar Ivan Tyagov

When multiple repositories exists and two of them contain scalability_test...

When multiple repositories exists and two of them contain scalability_test package be wiser and really check if neeeded Test Suite class exists before trying to load it.
parent 659ea62d
...@@ -452,11 +452,12 @@ Require valid-user ...@@ -452,11 +452,12 @@ Require valid-user
for location in location_list: for location in location_list:
try: try:
module = imp.load_source(SCALABILITY_TEST, "%s/%s/%s" %(location, SCALABILITY_TEST, TEST_SUITE_INIT)) module = imp.load_source(SCALABILITY_TEST, "%s/%s/%s" %(location, SCALABILITY_TEST, TEST_SUITE_INIT))
suite_class = getattr(module, test_suite) suite_class = getattr(module, test_suite, None)
suite = suite_class(**kwargs) if suite_class is not None:
if suite is not None: suite = suite_class(**kwargs)
repo_location = "%s/%s/" % (location, SCALABILITY_TEST) if suite is not None:
return suite, repo_location repo_location = "%s/%s/" % (location, SCALABILITY_TEST)
return suite, repo_location
except Exception: except Exception:
pass pass
return suite, repo_location return suite, repo_location
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment