summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-07-06 02:10:30 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-07-06 02:10:30 +0300
commit0dbcda6008849a5d909371e319aa4b195cd98a9f (patch)
treec20f167510037b8f83f8f6c87007c6be69011cab /scripts/automation
parent51db963aa7d8414b708f0a978cd16c67039a8d6e (diff)
regression: fix to wantFunction override
Diffstat (limited to 'scripts/automation')
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index e68c5c47..4f13a50f 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -57,10 +57,7 @@ Selector.wantMethod = new_Selector_wantMethod
def new_Selector_wantFunction(self, function, orig_Selector_wantFunction = Selector.wantFunction):
result = orig_Selector_wantFunction(self, function)
- if not CTRexScenario.test:
- return result
- else:
- return CTRexScenario.test in getattr(function, '__name__', '')
+ return result and (not CTRexScenario.test or CTRexScenario.test in getattr(function, '__name__', ''))
Selector.wantFunction = new_Selector_wantFunction