Merge "Adds option to skip specific tests"
diff --git a/common/config.py b/common/config.py
index c7a324b..b45a8d8 100644
--- a/common/config.py
+++ b/common/config.py
@@ -101,11 +101,13 @@
default=False,
help="Skip all functional tests"),
cfg.ListOpt('skip_functional_test_list',
- help="List of functional test class names to skip "
- "ex. AutoscalingGroupTest, CreateStackTest"),
+ help="List of functional test class or class.method "
+ "names to skip ex. AutoscalingGroupTest,"
+ "InstanceGroupBasicTest.test_size_updates_work"),
cfg.ListOpt('skip_scenario_test_list',
- help="List of scenario test class names to skip "
- "ex. NeutronLoadBalancerTest,"),
+ help="List of scenario test class or class.method "
+ "names to skip ex. NeutronLoadBalancerTest, "
+ "CeilometerAlarmTest.test_alarm"),
cfg.ListOpt('skip_test_stack_action_list',
help="List of stack actions in tests to skip "
"ex. ABANDON, ADOPT, SUSPEND, RESUME"),
diff --git a/functional/functional_base.py b/functional/functional_base.py
index 3a34238..3dff3e4 100644
--- a/functional/functional_base.py
+++ b/functional/functional_base.py
@@ -21,8 +21,11 @@
self.client = self.orchestration_client
def check_skip_test(self):
- test_name = self.__class__.__name__
- test_skipped = (self.conf.skip_functional_test_list and
- test_name in self.conf.skip_functional_test_list)
+ test_cls_name = self.__class__.__name__
+ test_method_name = '.'.join([test_cls_name, self._testMethodName])
+ test_skipped = (self.conf.skip_functional_test_list and (
+ test_cls_name in self.conf.skip_functional_test_list or
+ test_method_name in self.conf.skip_functional_test_list))
+
if self.conf.skip_functional_tests or test_skipped:
self.skipTest('Test disabled in conf, skipping')
diff --git a/scenario/scenario_base.py b/scenario/scenario_base.py
index e347e6a..84e14a9 100644
--- a/scenario/scenario_base.py
+++ b/scenario/scenario_base.py
@@ -59,8 +59,10 @@
return stack_id
def check_skip_test(self):
- test_name = self.__class__.__name__
- test_skipped = (self.conf.skip_scenario_test_list and
- test_name in self.conf.skip_scenario_test_list)
+ test_cls_name = self.__class__.__name__
+ test_method_name = '.'.join([test_cls_name, self._testMethodName])
+ test_skipped = (self.conf.skip_scenario_test_list and (
+ test_cls_name in self.conf.skip_scenario_test_list or
+ test_method_name in self.conf.skip_scenario_test_list))
if self.conf.skip_scenario_tests or test_skipped:
self.skipTest('Test disabled in conf, skipping')