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 0FBA5A2EFC for ; Wed, 18 Sep 2019 09:28:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87D961C125; 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 CC8901BF78 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:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,519,1559545200"; d="scan'208";a="202006475" Received: from dpdk-xinfengx-dut242.sh.intel.com ([10.67.117.34]) by fmsmga001.fm.intel.com with ESMTP; 18 Sep 2019 00:27:56 -0700 From: Xinfeng Zhao To: dts@dpdk.org Cc: Xinfeng Zhao Date: Wed, 18 Sep 2019 07:19:25 +0800 Message-Id: <1568762365-19112-5-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 5/5] tests/TestSuite_ddp_ppp_l2tp.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_ppp_l2tp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ddp_ppp_l2tp.py b/tests/TestSuite_ddp_ppp_l2tp.py index 2dd8baf..b1dc755 100644 --- a/tests/TestSuite_ddp_ppp_l2tp.py +++ b/tests/TestSuite_ddp_ppp_l2tp.py @@ -2,13 +2,18 @@ import time import re +import os import sys import utils from test_case import TestCase from pmd_output import PmdOutput -from settings import get_nic_name -from scapy.all import * +from settings import get_nic_name, FOLDERS +from scapy.all import Ether, IP, UDP, IPv6, IPv6, PPPoE import random +from l2tp import * + +CWD = os.getcwd() +DIR_DEPEND = os.path.join(CWD, FOLDERS['Depends']) class TestDdpPppL2tp(TestCase): @@ -147,6 +152,8 @@ class TestDdpPppL2tp(TestCase): """ pkts = self.ppp_l2tp_pkts(flowtype, keyword) for packet_type in pkts.keys(): + self.tester.scapy_append("sys.path.append('%s')" % DIR_DEPEND) + self.tester.scapy_append("from l2tp import *") self.tester.scapy_append( 'sendp([%s], iface="%s")' % (pkts[packet_type], self.tester_intf)) -- 2.17.1