[dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current dep

Tu, Lijuan lijuan.tu at intel.com
Sat Oct 12 08:10:07 CEST 2019


Please rework your patch series, the framework changed.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lihong
> Sent: Friday, October 11, 2019 8:25 AM
> To: dts at dpdk.org
> Cc: Ma, LihongX <lihongx.ma at intel.com>
> Subject: [dts] [PATCH V1 3/3][nsh] tests/uni_pkt: import nsh from current
> dep
> 
> Signed-off-by: lihong <lihongx.ma at 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



More information about the dts mailing list