diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-05-22 17:06:25 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-05-22 17:06:25 +0300 |
commit | 8e230286998bfa7a1dfcefe2493d5bee66d2746a (patch) | |
tree | dea698ff60c4819a744802981a818d59d6011547 /scripts/automation/regression/stateless_tests/stl_examples_test.py | |
parent | 6b12595f08d7d655d398e73753f3dad67982e856 (diff) |
regression: add disconnects + delay before running examples + at end of regression
revert profile udp_1ptk_simple.py and add new upd_for_benchmarks.py
Diffstat (limited to 'scripts/automation/regression/stateless_tests/stl_examples_test.py')
-rwxr-xr-x | scripts/automation/regression/stateless_tests/stl_examples_test.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/scripts/automation/regression/stateless_tests/stl_examples_test.py b/scripts/automation/regression/stateless_tests/stl_examples_test.py index 3f7d7b87..283635a7 100755 --- a/scripts/automation/regression/stateless_tests/stl_examples_test.py +++ b/scripts/automation/regression/stateless_tests/stl_examples_test.py @@ -2,22 +2,24 @@ from .stl_general_test import CStlGeneral_Test, CTRexScenario import os, sys from misc_methods import run_command +from time import sleep + + +def setUpModule(self): + # examples connect by their own + if CTRexScenario.stl_trex.is_connected(): + CTRexScenario.stl_trex.disconnect() + sleep(3) + +def tearDownModule(): + # connect back at end of tests + if not CTRexScenario.stl_trex.is_connected(): + CTRexScenario.stl_trex.connect() + class STLExamples_Test(CStlGeneral_Test): """This class defines the IMIX testcase of the T-Rex traffic generator""" - def setUp(self): - CStlGeneral_Test.setUp(self) - # examples connect by their own - if self.is_connected(): - CTRexScenario.stl_trex.disconnect() - - @classmethod - def tearDownClass(cls): - # connect back at end of tests - if not cls.is_connected(): - CTRexScenario.stl_trex.connect() - def test_stl_examples(self): examples_dir = '../trex_control_plane/stl/examples' examples_to_test = [ |