summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateless_tests/stl_examples_test.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-05-22 17:06:25 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-05-22 17:06:25 +0300
commit8e230286998bfa7a1dfcefe2493d5bee66d2746a (patch)
treedea698ff60c4819a744802981a818d59d6011547 /scripts/automation/regression/stateless_tests/stl_examples_test.py
parent6b12595f08d7d655d398e73753f3dad67982e856 (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-xscripts/automation/regression/stateless_tests/stl_examples_test.py26
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 = [