From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id AA10C38EB for ; Wed, 28 Sep 2016 10:05:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 28 Sep 2016 01:05:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,409,1470726000"; d="scan'208";a="1057642337" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 28 Sep 2016 01:05:54 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u8S85qoZ007186; Wed, 28 Sep 2016 16:05:52 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u8S85oti028040; Wed, 28 Sep 2016 16:05:52 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u8S85o9R028036; Wed, 28 Sep 2016 16:05:50 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Wed, 28 Sep 2016 16:05:48 +0800 Message-Id: <1475049948-28004-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] tests: merge suites into next branch X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:05:57 -0000 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 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