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 8DE0EA0487 for ; Mon, 29 Jul 2019 03:42:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 033DC1BF30; Mon, 29 Jul 2019 03:42:41 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B10E81BF2F for ; Mon, 29 Jul 2019 03:42:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2019 18:42:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,320,1559545200"; d="scan'208";a="199414946" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 28 Jul 2019 18:42:37 -0700 From: changqingxwu To: dts@dpdk.org Cc: changqingxwu Date: Mon, 29 Jul 2019 09:47:15 +0800 Message-Id: <1564364835-115171-1-git-send-email-changqingx.wu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd 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: changqingxwu --- tests/TestSuite_ipfrag.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py index f6d0373..9d2a97d 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -116,8 +116,15 @@ l3fwd_ipv4_route_array[] = {\\\n" rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" lpmStr_ipv6 = lpmStr_ipv6 + "};" - self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") - self.dut.send_expect(r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + + if self.dut.get_os_type() == "freebsd": + filename = "conf/0001-fix-ipfrag-failed-on-freeBSD.patch" + self.dut.session.copy_file_to(filename, self.dut.base_dir) + self.dut.send_expect("git apply 0001-fix-ipfrag-failed-on-freeBSD.patch", "#") + else: + self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") + self.dut.send_expect(r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") + # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") -- 2.17.2