Stop test execution in case of an plugin error

Without setting the on_load_failure_callback parameter
failures are ignored (only logged). This can be critical in
gate jobs.

Change-Id: I820784d759d6dc60ed86d29d90ef900207d848ad
Closes-Bug: #1474765
Marc Koderer 2015-07-15 11:28:38 +02:00
parent b5b118fb20
commit 25319f6fa0
1 changed files with 11 additions and 1 deletions

View File

@ -13,12 +13,16 @@
# under the License.
import abc
import logging
import six
import stevedore
from tempest_lib.common.utils import misc
LOG = logging.getLogger(__name__)
class TempestPlugin(object):
"""A TempestPlugin class provides the basic hooks for an external
@ -47,7 +51,13 @@ class TempestTestPluginManager(object):
def __init__(self):
self.ext_plugins = stevedore.ExtensionManager(
'tempest.test_plugins', invoke_on_load=True,
def failure_hook(_, ep, err):
LOG.error('Could not load %r: %s',, err)
raise err
def get_plugin_load_tests_tuple(self):
load_tests_dict = {}