[dts] [PATCH] tests/unit_tests_lpm: add lpm perf and lpm6 perf script
Tu, Lijuan
lijuan.tu at intel.com
Fri Jan 11 03:13:26 CET 2019
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xueqin Lin
> Sent: Wednesday, January 9, 2019 10:26 AM
> To: dts at dpdk.org
> Cc: Lin, Xueqin <xueqin.lin at intel.com>
> Subject: [dts] [PATCH] tests/unit_tests_lpm: add lpm perf and lpm6 perf script
>
> From: "xueqin.lin" <xueqin.lin at intel.com>
>
> Signed-off-by: Xueqin Lin <xueqin.lin at intel.com>
>
> ---
> tests/TestSuite_unit_tests_lpm.py | 32 +++++++++++++++++++++++++++++---
> 1 file changed, 29 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_unit_tests_lpm.py
> b/tests/TestSuite_unit_tests_lpm.py
> index 8a09ff2..6e73148 100644
> --- a/tests/TestSuite_unit_tests_lpm.py
> +++ b/tests/TestSuite_unit_tests_lpm.py
> @@ -71,9 +71,11 @@ class TestUnitTestsLpmIpv6(TestCase):
>
> def test_lpm(self):
> """
> - Run lpm for IPv6 autotest.
> + Run lpm for IPv4 autotest.
> """
> - self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target,
> self.coremask), "R.*T.*E.*>.*>", 60)
> + self.dut.send_expect(
> + "./%s/app/test -n 1 -c %s"
> + % (self.target, self.coremask), "R.*T.*E.*>.*>", 60)
> out = self.dut.send_expect("lpm_autotest", "RTE>>", 120)
> self.dut.send_expect("quit", "# ")
> self.verify("Test OK" in out, "Test failed") @@ -82,11 +84,35 @@ class
> TestUnitTestsLpmIpv6(TestCase):
> """
> Run lpm for IPv6 autotest.
> """
> - self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target,
> self.coremask), "R.*T.*E.*>.*>", 60)
> + self.dut.send_expect(
> + "./%s/app/test -n 1 -c %s"
> + % (self.target, self.coremask), "R.*T.*E.*>.*>", 60)
> out = self.dut.send_expect("lpm6_autotest", "RTE>>", 120)
> self.dut.send_expect("quit", "# ")
> self.verify("Test OK" in out, "Test failed")
>
> + def test_lpm_perf(self):
> + """
> + Run lpm for IPv4 performance autotest.
> + """
> + self.dut.send_expect(
> + "./%s/app/test -n 1 -c %s"
> + % (self.target, self.coremask), "R.*T.*E.*>.*>", 60)
> + out = self.dut.send_expect("lpm_perf_autotest", "RTE>>", 600)
> + self.dut.send_expect("quit", "# ")
> + self.verify("Test OK" in out, "Test failed")
> +
> + def test_lpm_ipv6_perf(self):
> + """
> + Run lpm for IPv6 performance autotest.
> + """
> + self.dut.send_expect(
> + "./%s/app/test -n 1 -c %s"
> + % (self.target, self.coremask), "R.*T.*E.*>.*>", 60)
> + out = self.dut.send_expect("lpm6_perf_autotest", "RTE>>", 120)
> + self.dut.send_expect("quit", "# ")
> + self.verify("Test OK" in out, "Test failed")
> +
> def tear_down(self):
> """
> Run after each test case.
> --
> 2.7.5
More information about the dts
mailing list