diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-06 02:10:30 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-06 02:10:30 +0300 |
commit | 0dbcda6008849a5d909371e319aa4b195cd98a9f (patch) | |
tree | c20f167510037b8f83f8f6c87007c6be69011cab /scripts/automation | |
parent | 51db963aa7d8414b708f0a978cd16c67039a8d6e (diff) |
regression: fix to wantFunction override
Diffstat (limited to 'scripts/automation')
-rwxr-xr-x | scripts/automation/regression/trex_unit_test.py | 5 |
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 |