test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd
@ 2019-07-29  1:47 changqingxwu
  2019-07-29  6:25 ` Ma, LihongX
  0 siblings, 1 reply; 6+ messages in thread
From: changqingxwu @ 2019-07-29  1:47 UTC (permalink / raw)
  To: dts; +Cc: changqingxwu

Signed-off-by: changqingxwu <changqingx.wu@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-06  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29  1:47 [dts] [PATCH V1] tests/ipfrag: sed and regex of linux diff freebsd changqingxwu
2019-07-29  6:25 ` Ma, LihongX
2019-07-29  6:42   ` Wu, ChangqingX
2019-07-30  1:29     ` Ma, LihongX
2019-07-30  1:37       ` Wu, ChangqingX
2019-08-06  1:27         ` Wu, ChangqingX

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).