From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CCD0A2EFC for ; Wed, 18 Sep 2019 09:28:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4866C1C120; Wed, 18 Sep 2019 09:28:02 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B086F2C6A for ; Wed, 18 Sep 2019 09:27:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2019 00:27:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,519,1559545200"; d="scan'208";a="202006471" Received: from dpdk-xinfengx-dut242.sh.intel.com ([10.67.117.34]) by fmsmga001.fm.intel.com with ESMTP; 18 Sep 2019 00:27:54 -0700 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Wed, 18 Sep 2019 07:19:24 +0800 Message-Id: <1568762365-19112-4-git-send-email-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568762365-19112-1-git-send-email-xinfengx.zhao@intel.com> References: <1568762365-19112-1-git-send-email-xinfengx.zhao@intel.com> Subject: [dts] [PATCH V1 4/5] tests/TestSuite_ddp_mpls.py: load the local dep module in scapy command 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: Xinfeng Zhao --- tests/TestSuite_ddp_mpls.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index 547e1c9..8e74047 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -1,6 +1,7 @@ # import time +import os import sys import utils from scapy.utils import rdpcap @@ -8,12 +9,15 @@ from scapy.utils import rdpcap from qemu_kvm import QEMUKvm from test_case import TestCase from pmd_output import PmdOutput -from settings import get_nic_name +from settings import get_nic_name, FOLDERS import random VM_CORES_MASK = 'all' PF_MAX_QUEUE = 64 VF_MAX_QUEUE = 4 +CWD = os.getcwd() +DIR_DEPEND = os.path.join(CWD, FOLDERS['Depends']) + class Testddp_mpls(TestCase): supported_vf_driver = ['pci-stub', 'vfio-pci'] @@ -175,7 +179,9 @@ class Testddp_mpls(TestCase): /MPLS(label=%s)/Ether()/IP()/UDP()'% label, 'mpls/bad chksum gre': 'Ether()/IP(proto=47)/GRE(chksum=0x1234,\ proto=0x8847)/MPLS(label=%s)/Ether()/IP()/UDP()'% label } - for packet_type in pkts.keys(): + for packet_type in pkts.keys(): + self.tester.scapy_append("sys.path.append('%s')" % DIR_DEPEND) + self.tester.scapy_append("from mpls import *") self.tester.scapy_append('sendp([%s], iface="%s")' % (pkts[packet_type], self.tester_intf)) self.tester.scapy_execute() -- 2.17.1