summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/unit_tests/trex_general_test.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-01-18 22:00:51 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-01-18 22:00:51 +0200
commiteee866f42bd0fc8472e6295b4f26bd0697e59f1f (patch)
treeb16947052643d6a0c7dd20012f0a1d664d044444 /scripts/automation/regression/unit_tests/trex_general_test.py
parentc88f411b3a69d6ea56c6b9758b10c30b87a6c94b (diff)
regression:
corrections of benchmarks move packet builder tests to functional folder add CPU utilization boundries for more tests print Skipping message fix relative drop counting API: convert hostname to IP at init of client side (trex_client.py) various: move python path determination to external common file add functional tests running bash script add sudo check to t-rex-64
Diffstat (limited to 'scripts/automation/regression/unit_tests/trex_general_test.py')
-rwxr-xr-xscripts/automation/regression/unit_tests/trex_general_test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/automation/regression/unit_tests/trex_general_test.py b/scripts/automation/regression/unit_tests/trex_general_test.py
index af3c897d..9bcccaab 100755
--- a/scripts/automation/regression/unit_tests/trex_general_test.py
+++ b/scripts/automation/regression/unit_tests/trex_general_test.py
@@ -213,7 +213,7 @@ class CTRexGeneral_Test(unittest.TestCase):
if not test_name:
test_name = self.get_name()
if test_name not in self.benchmark:
- self.skip('No data in benchmark.yaml for test %s, skipping.' % test_name)
+ self.skip('No data in benchmark.yaml for test: %s, param: %s. Skipping.' % (test_name, param))
if sub_param:
return self.benchmark[test_name][param].get(sub_param)
else:
@@ -230,7 +230,7 @@ class CTRexGeneral_Test(unittest.TestCase):
trex_tx_pckt = trex_res.get_last_value("trex-global.data.m_total_tx_pkts")
trex_drops = trex_res.get_total_drops()
trex_drop_rate = trex_res.get_drop_rate()
- if ( (trex_drops/trex_tx_pckt) > 0.001) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when T-Rex first initiated
+ if ( trex_drops > 0.001 * trex_tx_pckt) and (trex_drop_rate > 0.0): # deliberately mask kickoff drops when T-Rex first initiated
self.fail('Number of packet drops larger than 0.1% of all traffic')
# check queue full, queue drop, allocation error
@@ -282,7 +282,8 @@ class CTRexGeneral_Test(unittest.TestCase):
self.fail_reasons.append(reason)
# skip running of the test, counts as 'passed' but prints 'skipped'
- def skip(self, message = ''):
+ def skip(self, message = 'Unknown reason'):
+ print 'Skip: %s' % message
self.skipping = True
raise SkipTest(message)