diff options
author | imarom <imarom@cisco.com> | 2017-01-22 16:20:45 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2017-01-22 16:20:45 +0200 |
commit | 904eacd9be1230efb7ae0ab7997ec131b588ec8a (patch) | |
tree | 8e4bcd1b1a5f683efdb8f3eeb962acefc3201961 /scripts/automation/regression/stateful_tests/trex_client_cfg_test.py | |
parent | d2f1c8451e2e8ffc47b208f68f9b16697d706d60 (diff) | |
parent | b81cdb6c2d6d118c1c346e7c8dae6a5e747d867d (diff) |
Merge branch 'master' into capture
Signed-off-by: imarom <imarom@cisco.com>
Conflicts:
scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py
scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
src/main_dpdk.cpp
Diffstat (limited to 'scripts/automation/regression/stateful_tests/trex_client_cfg_test.py')
-rw-r--r-- | scripts/automation/regression/stateful_tests/trex_client_cfg_test.py | 68 |
1 files changed, 48 insertions, 20 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_client_cfg_test.py b/scripts/automation/regression/stateful_tests/trex_client_cfg_test.py index 852e745d..158f59b9 100644 --- a/scripts/automation/regression/stateful_tests/trex_client_cfg_test.py +++ b/scripts/automation/regression/stateful_tests/trex_client_cfg_test.py @@ -1,5 +1,6 @@ #!/router/bin/python from .trex_general_test import CTRexGeneral_Test, CTRexScenario +from .trex_nbar_test import CTRexNbarBase from CPlatform import CStaticRouteConfig from .tests_exceptions import * #import sys @@ -8,44 +9,71 @@ from nose.tools import nottest # Testing client cfg ARP resolve. Actually, just need to check that TRex run finished with no errors. # If resolve will fail, TRex will exit with exit code != 0 -class CTRexClientCfg_Test(CTRexGeneral_Test): +class CTRexClientCfg_Test(CTRexNbarBase): """This class defines the IMIX testcase of the TRex traffic generator""" def __init__(self, *args, **kwargs): - # super(CTRexClientCfg_Test, self).__init__() - CTRexGeneral_Test.__init__(self, *args, **kwargs) + CTRexNbarBase.__init__(self, *args, **kwargs) def setUp(self): if CTRexScenario.setup_name == 'kiwi02': self.skip("Can't run currently on kiwi02") + super(CTRexClientCfg_Test, self).setUp() # launch super test class setUp process - pass - def test_client_cfg(self): - # test initializtion + def test_client_cfg_nbar(self): if self.is_loopback: - return - else: - self.router.configure_basic_interfaces() - self.router.config_pbr(mode = "config") - - ret = self.trex.start_trex( - c = 1, - m = 1, - d = 10, - f = 'cap2/dns.yaml', - v = 3, + self.skip('No NBAR on loopback') + + self.router.configure_basic_interfaces() + self.router.config_pbr(mode = "config") + self.router.config_nbar_pd() + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + + ret = self.trex.start_trex ( + c = core, + m = mult, + nc = True, + p = True, + d = 100, + f = 'avl/sfr_delay_10_1g.yaml', client_cfg = 'automation/regression/cfg/client_cfg.yaml', l = 1000) trex_res = self.trex.sample_to_run_finish() - print("\nLATEST RESULT OBJECT:") print(trex_res) + self.check_general_scenario_results(trex_res, check_latency = False) # no latency with client config + self.match_classification() + + def test_client_cfg_vlan(self): + if self.is_loopback: + self.skip('Not relevant on loopback') + + self.router.configure_basic_interfaces(vlan = True) + self.router.config_pbr(mode = "config", vlan = True) + + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') + + ret = self.trex.start_trex ( + c = core, + m = mult, + nc = True, + p = True, + d = 60, + f = 'cap2/dns.yaml', + limit_ports = 4, + client_cfg = 'automation/regression/cfg/client_cfg_vlan.yaml') - self.check_general_scenario_results(trex_res) + trex_res = self.trex.sample_to_run_finish() + print("\nLATEST RESULT OBJECT:") + print(trex_res) + self.check_general_scenario_results(trex_res, check_latency = False) # no latency with client config def tearDown(self): - CTRexGeneral_Test.tearDown(self) + CTRexNbarBase.tearDown(self) pass if __name__ == "__main__": |