Fix tempest tests list

Running command `testr list-tests zaqar` under tempest directory
get an empty list instead of the list of zaqar tempest list. This
patch set bath_path to the top directory of zaqar.

Change-Id: I8c91b83bfb5da37a95d6a797f1882221ccdc437a
Closes-Bug: #1563925
This commit is contained in:
Ethan Lynn 2016-03-30 23:23:08 +08:00
parent 5bfbb47011
commit 82e02a14bf

View File

@ -25,6 +25,9 @@ class ZaqarTempestPlugin(plugins.TempestPlugin):
def load_tests(self):
base_path = os.path.split(os.path.dirname(
os.path.abspath(__file__)))[0]
# Note: base_path should be set to the top directory
# of zaqar.
base_path += '/../..'
test_dir = "zaqar/tests/tempest_plugin/tests"
full_test_dir = os.path.join(base_path, test_dir)
return full_test_dir, base_path