diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-05 20:44:45 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-07-05 20:44:45 +0300 |
commit | 51db963aa7d8414b708f0a978cd16c67039a8d6e (patch) | |
tree | 45135f63c63a40227987d4c1deef9e294388aa0c /scripts/automation/regression | |
parent | 17e8c035f98516e53902aeb8e537806b61504792 (diff) |
various fixes
Diffstat (limited to 'scripts/automation/regression')
4 files changed, 19 insertions, 19 deletions
diff --git a/scripts/automation/regression/CPlatform.py b/scripts/automation/regression/CPlatform.py index 256d7411..dc5418cb 100755 --- a/scripts/automation/regression/CPlatform.py +++ b/scripts/automation/regression/CPlatform.py @@ -70,11 +70,10 @@ class CPlatform(object): res = self.cmd_link.run_single_command(cache) if 'Rollback Done' not in res: print('Failed to load clean config, trying again') + time.sleep(2) if i < 4: continue raise Exception('Could not load clean config, response: %s' % res) - if i > 0: # were errors, better to wait - time.sleep(2) def config_pbr (self, mode = 'config'): idx = 1 diff --git a/scripts/automation/regression/setups/trex07/benchmark.yaml b/scripts/automation/regression/setups/trex07/benchmark.yaml index 98bbaf14..1475abec 100644 --- a/scripts/automation/regression/setups/trex07/benchmark.yaml +++ b/scripts/automation/regression/setups/trex07/benchmark.yaml @@ -98,7 +98,7 @@ test_rx_check_http_ipv6: << : *rx_http bw_per_core : 49.237 -test_rx_check_http_negative: +test_rx_check_http_negative_disabled: << : *rx_http stat_route_dict : *stat_route_dict nat_dict : *nat_dict diff --git a/scripts/automation/regression/stateless_tests/stl_general_test.py b/scripts/automation/regression/stateless_tests/stl_general_test.py index 82738f96..3a22e596 100644 --- a/scripts/automation/regression/stateless_tests/stl_general_test.py +++ b/scripts/automation/regression/stateless_tests/stl_general_test.py @@ -85,18 +85,22 @@ class STLBasic_Test(CStlGeneral_Test): @nottest def test_connectivity(self): if not self.is_loopback: - if CTRexScenario.router_cfg['forceImageReload']: - CTRexScenario.router.load_clean_config() - CTRexScenario.router.configure_basic_interfaces() - CTRexScenario.router.config_pbr(mode = "config") - - err = 'Client could not connect' - CTRexScenario.stl_init_error = err + try: + if CTRexScenario.router_cfg['forceImageReload']: + CTRexScenario.router.load_clean_config() + CTRexScenario.router.configure_basic_interfaces() + CTRexScenario.router.config_pbr(mode = "config") + except Exception as e: + CTRexScenario.stl_init_error = 'Could not configure device, err: %s' % e + self.fail(CTRexScenario.stl_init_error) + return if not self.connect(): - self.fail(err) - err = 'Client could not map ports' - CTRexScenario.stl_init_error = err + CTRexScenario.stl_init_error = 'Client could not connect' + self.fail(CTRexScenario.stl_init_error) + return + print('Connected') if not self.map_ports(): - self.fail(err) + CTRexScenario.stl_init_error = 'Client could not map ports' + self.fail(CTRexScenario.stl_init_error) + return print('Got ports mapping: %s' % CTRexScenario.stl_ports_map) - CTRexScenario.stl_init_error = None diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py index 4ff21b80..e68c5c47 100755 --- a/scripts/automation/regression/trex_unit_test.py +++ b/scripts/automation/regression/trex_unit_test.py @@ -51,10 +51,7 @@ from distutils.dir_util import mkpath # option to select wanted test by name without file, class etc. def new_Selector_wantMethod(self, method, orig_Selector_wantMethod = Selector.wantMethod): result = orig_Selector_wantMethod(self, method) - if not CTRexScenario.test: - return result - else: - return CTRexScenario.test in getattr(method, '__name__', '') + return result and (not CTRexScenario.test or CTRexScenario.test in getattr(method, '__name__', '')) Selector.wantMethod = new_Selector_wantMethod |