[dts] [PATCH V1] tests/unit_tests_power:change hard coding for core numbers
Tu, Lijuan
lijuan.tu at intel.com
Tue Oct 23 09:39:44 CEST 2018
Please extend to all test cases in the suite.
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of yaobing
> Sent: Tuesday, October 23, 2018 2:46 PM
> To: dts at dpdk.org
> Cc: Yao, BingX Y <bingx.y.yao at intel.com>
> Subject: [dts] [PATCH V1] tests/unit_tests_power:change hard coding for
> core numbers
>
> so give up hard coding at beginning of dts coding -- change hard coding for
> core numbers in test app startup options
>
> Signed-off-by: yaobing <bingx.y.yao at intel.com>
> ---
> tests/TestSuite_unit_tests_power.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_unit_tests_power.py
> b/tests/TestSuite_unit_tests_power.py
> index 970e0a6..7405593 100644
> --- a/tests/TestSuite_unit_tests_power.py
> +++ b/tests/TestSuite_unit_tests_power.py
> @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK for
> power feature.
> """
>
> from test_case import TestCase
> +import utils
>
> #
> #
> @@ -62,14 +63,15 @@ class TestUnitTestsPower(TestCase):
> """
> Run before each test case.
> """
> - pass
> + cores = self.dut.get_core_list("all")
> + self.coremask = utils.create_mask(cores)
>
> def test_power(self):
> """
> Run power autotest.
> """
>
> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target,
> "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("power_autotest", "RTE>>", 60)
> self.dut.send_expect("quit", "# ")
> self.verify("Test OK" in out, "Test failed")
> --
> 2.17.2
More information about the dts
mailing list