test suite reviews and discussions
 help / color / mirror / Atom feed
From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH] tests: merge suites into next branch
Date: Wed, 28 Sep 2016 16:05:48 +0800	[thread overview]
Message-ID: <1475049948-28004-1-git-send-email-yong.liu@intel.com> (raw)

Most of command functions removed from dts to utils module in next
branch. When merge next back to master, need to modify new suites.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/tests/TestSuite_etag.py b/tests/TestSuite_etag.py
index e399714..642fb2b 100644
--- a/tests/TestSuite_etag.py
+++ b/tests/TestSuite_etag.py
@@ -38,7 +38,7 @@ import re
 import time
 import sys
 
-import dts
+import utils
 from qemu_kvm import QEMUKvm
 from test_case import TestCase
 from pmd_output import PmdOutput
@@ -59,7 +59,7 @@ class TestEtag(TestCase):
         self.src_mac =  self.tester.get_mac(self.tester.get_local_port(0))
         self.dst_mac = self.dut.get_mac_address(0)
         self.vm0 = None
-        self.printFlag = dts.debug_mode
+        self.printFlag = self._enable_debug
         self.dut.send_expect('ls', '#')
         self.setup_vm_env_flag = 0
         self.preset_host_cmds = list()
@@ -159,10 +159,10 @@ class TestEtag(TestCase):
                     if self.printFlag:# debug output
                         print pkt_attribute
                     if pkt_attribute not in out:
-                        print dts.RED('Fail to detect %s' % pkt_attribute)
+                        print utils.RED('Fail to detect %s' % pkt_attribute)
                         if not self.printFlag:# print out all info in debug mode
                             raise VerifyFailure('Failed to detect %s' % pkt_attribute)
-                print dts.GREEN('VM detected %s successfully' % pkt_type)
+                print utils.GREEN('VM detected %s successfully' % pkt_type)
 
             # check dut testpmd packet received information
             if 'dut' in pkt_types[pkt_type].keys():
@@ -173,10 +173,10 @@ class TestEtag(TestCase):
                     if self.printFlag:# debug output
                         print pkt_attribute
                     if pkt_attribute not in out:
-                        print dts.RED('Fail to detect %s' % pkt_attribute)
+                        print utils.RED('Fail to detect %s' % pkt_attribute)
                         if not self.printFlag:# print out all info in debug mode
                             raise VerifyFailure('Failed to detect %s' % pkt_attribute)
-                print dts.GREEN('DUT detected %s successfully' % pkt_type)
+                print utils.GREEN('DUT detected %s successfully' % pkt_type)
             time.sleep(1)
 
     def preset_host_testpmd(self, core_mask, eal_param):
diff --git a/tests/TestSuite_ftag.py b/tests/TestSuite_ftag.py
index 1f9386d..d290a04 100644
--- a/tests/TestSuite_ftag.py
+++ b/tests/TestSuite_ftag.py
@@ -38,7 +38,6 @@ Test ftag feature
 
 """
 
-import dts
 import re
 import os
 import time
diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py
index 0868ffc..c79b4ad 100644
--- a/tests/TestSuite_ipgre.py
+++ b/tests/TestSuite_ipgre.py
@@ -39,7 +39,7 @@ inside virtual point-to-point links over an Internet Protocol network.
 Fortville support GRE packet detecting, checksum computing and filtering.
 """
 
-import dts
+import utils
 import re
 import time
 import os
@@ -62,7 +62,7 @@ class TestIpgre(TestCase):
         """
         Run at the start of each test suite.
         """
-        self.printFlag = dts.debug_mode
+        self.printFlag = self._enable_debug
         ports = self.dut.get_ports()
         self.verify(self.nic.startswith("fortville"),
                     "GRE tunnel packet type only support by Fortville")
@@ -110,11 +110,11 @@ class TestIpgre(TestCase):
                 if self.printFlag:# debug output
                     print pkt_layer_name
                 if pkt_layer_name not in out:
-                    print dts.RED("Fail to detect %s" % pkt_layer_name)
+                    print utils.RED("Fail to detect %s" % pkt_layer_name)
                     if not self.printFlag:
                         raise VerifyFailure("Failed to detect %s" % pkt_layer_name)
             else:
-                print dts.GREEN("Detected %s successfully" % pkt_type)
+                print utils.GREEN("Detected %s successfully" % pkt_type)
 	        time.sleep(1)
 
     def save_ref_packet(self, pkt_types, layer_configs=None):
@@ -169,7 +169,7 @@ class TestIpgre(TestCase):
         # verify saved pcap checksum same to expected checksum
         for key in chksums_ref:
             self.verify(int(chksums[key], 16) == int(chksums_ref[key], 16), "%s not matched to %s" % (key, chksums_ref[key]))
-        print dts.GREEN("Checksum is ok")
+        print utils.GREEN("Checksum is ok")
 
     def test_GRE_ipv4_packet_detect(self):
         """
diff --git a/tests/TestSuite_keep_alive.py b/tests/TestSuite_keep_alive.py
index 2ed14f8..41c8732 100644
--- a/tests/TestSuite_keep_alive.py
+++ b/tests/TestSuite_keep_alive.py
@@ -35,10 +35,10 @@ DPDK Test suite.
 Test keep alive
 """
 
-import dts
 import string
 import time
 import re
+import utils
 from test_case import TestCase
 from plotting import Plotting 
 from settings import HEADER_SIZE   
@@ -55,7 +55,7 @@ class TestKeepAlive(TestCase):
         self.dut_ports = self.dut.get_ports(self.nic)
         self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
         cores = self.dut.get_core_list("1S/4C/1T")
-        self.coremask = dts.create_mask(cores)
+        self.coremask = utils.create_mask(cores)
 
         self.path = "./examples/l2fwd-keepalive/build/l2fwd-keepalive" 
 
diff --git a/tests/TestSuite_l2fwd_crypto.py b/tests/TestSuite_l2fwd_crypto.py
index 3dd5344..9c78a6f 100644
--- a/tests/TestSuite_l2fwd_crypto.py
+++ b/tests/TestSuite_l2fwd_crypto.py
@@ -33,7 +33,7 @@ import hmac
 import hashlib
 import binascii
 
-import dts
+import utils
 import time
 
 from test_case import TestCase
@@ -55,10 +55,10 @@ class TestL2fwdCrypto(TestCase):
         self.logger.info("dut ports = " + str(self.dut_ports))
         self.logger.info("ports_socket = " + str(self.ports_socket))
 
-        self.core_mask = dts.create_mask(self.dut.get_core_list(
+        self.core_mask = utils.create_mask(self.dut.get_core_list(
                                          self.core_config,
                                          socket=self.ports_socket))
-        self.port_mask = dts.create_mask([self.dut_ports[0]])
+        self.port_mask = utils.create_mask([self.dut_ports[0]])
 
         self.tx_port = self.tester.get_local_port(self.dut_ports[0])
         self.rx_port = self.tester.get_local_port(self.dut_ports[0])
-- 
1.9.3

                 reply	other threads:[~2016-09-28  8:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475049948-28004-1-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).