From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2FA3A04FF; Tue, 22 Mar 2022 09:53:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC8B2427F1; Tue, 22 Mar 2022 09:53:42 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 6B2E8410E5 for ; Tue, 22 Mar 2022 09:53:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647939221; x=1679475221; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fJ9qZI8rCKvJuRA6YOLd0HN36QIo56WImqdgHBTTFK8=; b=db8o8M/29Ll/zysS6AHre/pX9KhDjBpSXC6cGEA/Q5thTKfXuN7GNs2F 35W8VWpk09VlzEkjgW5H4JqKd/142tCXyvbzOkgakdQ6XNpEusws+rVYW myzs0PCIWSrH5gExQyW+UmVjPva9Ev236g/adzJthKBXpD44yfgNTYXW/ 90Atmk7YhPgswHWmh+1YlDLYG4GtkNyCthicw3zPU6cXsIlTqLM+4AdCX xFXHuQbzC9FW7LFVXfA+IcD3z/HXnH7wTRK/IU4k6jJsnPYDbiEmA14as SWgzTNME4mvOvyXZLe+0GWr3zV6O3ds5s5LrgSCBVscNlBbE0QiQ5oRqc A==; X-IronPort-AV: E=McAfee;i="6200,9189,10293"; a="257955754" X-IronPort-AV: E=Sophos;i="5.90,201,1643702400"; d="scan'208";a="257955754" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 01:53:38 -0700 X-IronPort-AV: E=Sophos;i="5.90,201,1643702400"; d="scan'208";a="692475838" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.70]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 01:53:35 -0700 From: Jun Dong To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [dts] [V1] framework/tester: Fix issues of import scapy dependent package Date: Tue, 22 Mar 2022 16:53:27 +0800 Message-Id: <20220322085327.290-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 Signed-off-by: Jun Dong --- framework/tester.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/tester.py b/framework/tester.py index 21b6702e..d387983f 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -111,6 +111,12 @@ class Tester(Crb): session = self.create_session(session_name) self.scapy_sessions_li.append(session) session.send_expect("scapy", ">>> ") + + # import scapy moudle to scapy APP + out = session.session.send_expect(get_scapy_module_impcmd(), ">>> ") + if "ImportError" in out: + session.logger.warning(f"entering import error: {out}") + return session def check_scapy_version(self): -- 2.25.1