test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Ma, LihongX" <lihongx.ma@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep
Date: Mon, 14 Oct 2019 05:04:06 +0000	[thread overview]
Message-ID: <BE1E572D0441E34284F1F8B7AC28F1970BB138BC@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <B8B15C44A3F2C044966E545C7B7371153E85E96C@shsmsx102.ccr.corp.intel.com>

Hi, yufeng

The path of os.getcwd() is dts, not the dts/tests, so the path is dts/dep

-----Original Message-----
From: Mo, YufengX 
Sent: Saturday, October 12, 2019 9:26 AM
To: Ma, LihongX <lihongx.ma@intel.com>; dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: RE: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep

Hi,ma lihong

> +        cwd = os.getcwd()
> +        dir_module = 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 <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from 
> current dep
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_uni_pkt.py | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py 
> 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
> 
> 
> @@ -442,10 +443,12 @@ class TestUniPacket(TestCase):
>                                "ether+nsh+ipv6+udp": "L2_ETHER_NSH L3_IPV6_EXT_UNKNOWN L4_UDP", \
>                                "ether+nsh+ipv6+sctp": "L2_ETHER_NSH L3_IPV6_EXT_UNKNOWN L4_SCTP"
>                               }
> -
> +        cwd = os.getcwd()
> +        dir_module = 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_module)
> +            self.tester.scapy_append("from nsh import NSH")
>              self.tester.scapy_append("sendp([%s],iface='%s')" % (nsh_packets[packet], self.tester_iface))
>              self.tester.scapy_execute()
>              out = self.dut.get_session_output(timeout=2)
> --
> 2.7.4


  parent reply	other threads:[~2019-10-14  5:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  0:25 [dts] [PATCH V1 1/3][nsh] framwork/packet: add support of mpls and nsh lihong
2019-10-11  0:25 ` [dts] [PATCH V1 2/3][nsh] dep: " lihong
2019-10-11  0:25 ` [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep lihong
2019-10-12  1:26   ` Mo, YufengX
2019-10-12  2:02     ` Mo, YufengX
2019-10-14  5:15       ` Ma, LihongX
2019-10-14  5:04     ` Ma, LihongX [this message]
2019-10-12  6:10   ` Tu, Lijuan

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=BE1E572D0441E34284F1F8B7AC28F1970BB138BC@SHSMSX101.ccr.corp.intel.com \
    --to=lihongx.ma@intel.com \
    --cc=dts@dpdk.org \
    --cc=yufengx.mo@intel.com \
    /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).