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 7E7C4A2EFC for ; Mon, 14 Oct 2019 07:04:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 323B21C196; Mon, 14 Oct 2019 07:04:12 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 49CD11C190 for ; Mon, 14 Oct 2019 07:04:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2019 22:04:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,294,1566889200"; d="scan'208";a="207093292" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 13 Oct 2019 22:04:08 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 13 Oct 2019 22:04:08 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 13 Oct 2019 22:04:08 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX152.ccr.corp.intel.com ([10.239.6.52]) with mapi id 14.03.0439.000; Mon, 14 Oct 2019 13:04:06 +0800 From: "Ma, LihongX" To: "Mo, YufengX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep Thread-Index: AQHVgJwQ8tvPSP04jEm6ynxf02IYQqdZmDnQ Date: Mon, 14 Oct 2019 05:04:06 +0000 Message-ID: References: <1570753506-1810-1-git-send-email-lihongx.ma@intel.com> <1570753506-1810-3-git-send-email-lihongx.ma@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep 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" Hi, yufeng The path of os.getcwd() is dts, not the dts/tests, so the path is dts/dep -----Original Message----- From: Mo, YufengX=20 Sent: Saturday, October 12, 2019 9:26 AM To: Ma, LihongX ; dts@dpdk.org Cc: Ma, LihongX Subject: RE: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from curre= nt dep Hi,ma lihong > + cwd =3D os.getcwd() > + dir_module =3D cwd + r"/" + "dep" It will be '/xxx/dts/tests/dep'. Are you sure? > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Friday, October 11, 2019 8:25 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from=20 > current dep >=20 > Signed-off-by: lihong > --- > tests/TestSuite_uni_pkt.py | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py=20 > index 9a75061..cdc5849 100644 > --- a/tests/TestSuite_uni_pkt.py > +++ b/tests/TestSuite_uni_pkt.py > @@ -47,6 +47,7 @@ import utils > from test_case import TestCase > from exception import VerifyFailure > from packet import Packet > +import os > import time >=20 >=20 > @@ -442,10 +443,12 @@ class TestUniPacket(TestCase): > "ether+nsh+ipv6+udp": "L2_ETHER_NSH L3_IPV= 6_EXT_UNKNOWN L4_UDP", \ > "ether+nsh+ipv6+sctp": "L2_ETHER_NSH L3_IP= V6_EXT_UNKNOWN L4_SCTP" > } > - > + cwd =3D os.getcwd() > + dir_module =3D cwd + r"/" + "dep" > for packet in nsh_packets: > self.tester.scapy_foreground() > - self.tester.scapy_append("from scapy.contrib.nsh import *") > + self.tester.scapy_append("sys.path.append('%s')" % dir_modul= e) > + self.tester.scapy_append("from nsh import NSH") > self.tester.scapy_append("sendp([%s],iface=3D'%s')" % (nsh_p= ackets[packet], self.tester_iface)) > self.tester.scapy_execute() > out =3D self.dut.get_session_output(timeout=3D2) > -- > 2.7.4