test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 1/2] tests/meson_tests: modify meson_tests suite to support test config in conf
@ 2022-11-10  7:32 Weiyuan Li
  2022-11-10  7:32 ` [dts][PATCH V1 2/2] conf/meson_tests: " Weiyuan Li
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-11-10  7:32 UTC (permalink / raw)
  To: dts; +Cc: Weiyuan Li

Modify meson_tests suite to support test config (TIMEOUT_MULTIPLIER,
TEST_ARGS etc.) in conf/meson_tests.cfg.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_meson_tests.py | 61 ++++++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_meson_tests.py b/tests/TestSuite_meson_tests.py
index ee95fffa..2b9f0c6a 100644
--- a/tests/TestSuite_meson_tests.py
+++ b/tests/TestSuite_meson_tests.py
@@ -13,8 +13,31 @@ from mimetypes import init
 from sre_constants import SUCCESS
 
 import framework.utils as utils
+from framework.config import UserConf
+from framework.settings import CONFIG_ROOT_PATH
 from framework.test_case import TestCase
 
+meson_args = {
+    "time_out": "-t",
+    "test_args": "--test-args",
+    "verbose": "-v",
+    "num_processes": "--num-processes",
+    "repeat": "--repeat",
+    "no-rebuild": "--no-rebuild",
+    "gdb": "--gdb",
+    "gdb-path": "--gdb-path",
+    "list": "--list",
+    "wrapper": "--wrapper",
+    "WD": "-C",
+    "no-suite": "--no-suite",
+    "no-stdsplit": "--no-stdsplit",
+    "print-errorlogs": "--print-errorlogs",
+    "benchmark": "--benchmark",
+    "logbase": "--logbase",
+    "quiet": "--quiet",
+    "setup": "--setup",
+}
+
 
 class TestMesonTests(TestCase):
     def set_up_all(self):
@@ -36,6 +59,9 @@ class TestMesonTests(TestCase):
             os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "output"
         )
 
+        config_file = os.path.join(CONFIG_ROOT_PATH, "meson_tests.cfg")
+        self.config_peer = UserConf(config_file)
+
     def set_up(self):
         """
         Run before each test case.
@@ -99,6 +125,21 @@ class TestMesonTests(TestCase):
                 sub_timeout = "[" + ",".join(timeout) + "] sub case time out. "
             self.verify(False, f"Test failed. {sub_fail}{sub_timeout}")
 
+    def meson_param(self, caselist):
+        param = ""
+        conf_session = self.config_peer.conf._sections
+        suite = conf_session["suite"][caselist]
+        params_list = conf_session["options"]
+        if suite != "-1":
+            param += suite
+        for item in params_list:
+            param_vlaue = params_list[item]
+            if item in meson_args.keys():
+                key = meson_args[item]
+            if param_vlaue != "-1":
+                param += " " + key + " " + params_list[item]
+        return param
+
     def check_scp_file_valid_between_dut(self):
         out = self.tester.send_command(
             f"scp root@{self.dut_ip}:/root/{self.dut_pathlog} {self.base_output}",
@@ -141,49 +182,49 @@ class TestMesonTests(TestCase):
         self.check_sub_case()
 
     def test_fasts(self):
+        param = self.meson_param("fast-tests")
         # init file name
         self.dut_pathlog = "fast-test.log"
         self.delete_exists_files()
         self.insmod_kni()
         # config test case list in conf/meson_tests.cfg
-        caselist = self.get_suite_cfg()["fast-tests"]
-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {caselist} -t {self.ratio} --test-args="-c 0xff" |tee /root/{self.dut_pathlog}'
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:fast-tests {param} |tee /root/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.check_scp_file_valid_between_dut()
         self.check_meson_test_result()
 
     def test_driver(self):
+        param = self.meson_param("driver-tests")
         # init file name
         self.dut_pathlog = "driver-test.log"
         self.delete_exists_files()
         # config test case list in conf/meson_tests.cfg
-        caselist = self.get_suite_cfg()["driver-tests"]
-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {caselist} -t {self.ratio} --test-args="-c 0xff" |tee /root/{self.dut_pathlog}'
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:driver-tests {param} |tee /root/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.check_scp_file_valid_between_dut()
         self.check_meson_test_result()
 
     def test_debug(self):
+        param = self.meson_param("debug-tests")
         self.dut_pathlog = "test-debug.log"
         # delete exists files
         self.delete_exists_files()
         # config test case list in conf/meson_tests.cfg
-        caselist = self.get_suite_cfg()["debug-tests"]
-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {caselist} -t {self.ratio} --test-args="-c 0xff" |tee /root/{self.dut_pathlog}'
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:debug-tests {param} |tee /root/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.check_scp_file_valid_between_dut()
         self.check_meson_test_result()
 
     def test_extra(self):
+        param = self.meson_param("extra-tests")
         self.dut_pathlog = "extra-test.log"
         # delete exists files
         self.delete_exists_files()
         # config test case list in conf/meson_tests.cfg
-        caselist = self.get_suite_cfg()["extra-tests"]
-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {caselist} -t {self.ratio} --test-args="-c 0xff" |tee /root/{self.dut_pathlog}'
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:extra-tests {param} |tee /root/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.check_scp_file_valid_between_dut()
@@ -193,13 +234,13 @@ class TestMesonTests(TestCase):
         )
 
     def test_perf(self):
+        param = self.meson_param("perf-tests")
         # init file name
         self.dut_pathlog = "perf-test.log"
         # delete exists files
         self.delete_exists_files()
         # config test case list in conf/meson_tests.cfg
-        caselist = self.get_suite_cfg()["perf-tests"]
-        cmds = f'meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {caselist} -t {self.ratio} --test-args="-c 0xff" |tee /root/{self.dut_pathlog}'
+        cmds = f"meson test -C x86_64-native-linuxapp-gcc/ --suite DPDK:perf-tests {param} |tee /root/{self.dut_pathlog}"
         out = self.dut.send_expect(cmds, "# ", self.execute_wait_time)
         self.logger.info(out)
         self.check_scp_file_valid_between_dut()
-- 
2.27.0


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

* [dts][PATCH V1 2/2] conf/meson_tests: modify meson_tests suite to support test config in conf
  2022-11-10  7:32 [dts][PATCH V1 1/2] tests/meson_tests: modify meson_tests suite to support test config in conf Weiyuan Li
@ 2022-11-10  7:32 ` Weiyuan Li
  2022-11-17  8:01   ` Jiang, YuX
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-11-10  7:32 UTC (permalink / raw)
  To: dts; +Cc: Weiyuan Li

Modify meson_tests suite to support test config (TIMEOUT_MULTIPLIER,
TEST_ARGS etc.) in conf/meson_tests.cfg.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 conf/meson_tests.cfg | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/conf/meson_tests.cfg b/conf/meson_tests.cfg
index 8dcb3d2e..4345c6da 100644
--- a/conf/meson_tests.cfg
+++ b/conf/meson_tests.cfg
@@ -1,8 +1,14 @@
 # config unit test case for meson test
 # caselist = thash_autotest trace_autotest
+# config options if set -1 is nothing
 [suite]
-fast-tests  = " "
-driver-tests = " "
-debug-tests = " "
-extra-tests = " "
-perf-tests = " "
+fast-tests  = -1
+driver-tests = -1
+debug-tests = -1
+extra-tests = -1
+perf-tests = -1
+[options]
+time_out = 14
+test_args = "-c 0xff"
+verbose = -1
+num_processes = "20"
-- 
2.27.0


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

* RE: [dts][PATCH V1 2/2] conf/meson_tests: modify meson_tests suite to support test config in conf
  2022-11-10  7:32 ` [dts][PATCH V1 2/2] conf/meson_tests: " Weiyuan Li
@ 2022-11-17  8:01   ` Jiang, YuX
  0 siblings, 0 replies; 3+ messages in thread
From: Jiang, YuX @ 2022-11-17  8:01 UTC (permalink / raw)
  To: Li, WeiyuanX, dts; +Cc: Li, WeiyuanX, Jiang, YuX


> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Thursday, November 10, 2022 3:33 PM
> To: dts@dpdk.org
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1 2/2] conf/meson_tests: modify meson_tests suite to
> support test config in conf
> 
> Modify meson_tests suite to support test config (TIMEOUT_MULTIPLIER,
> TEST_ARGS etc.) in conf/meson_tests.cfg.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
Tested-by: Yu Jiang <yux.jiang@intel.com>

Except two known bugs:
  1, https://bugs.dpdk.org/show_bug.cgi?id=1107 [22.11-rc1][meson test] seqlock_autotest test failed, which is only found on CentOS7.9/gcc4.8.5. No fix yet.
  2, https://bugs.dpdk.org/show_bug.cgi?id=1024 [dpdk-22.07][meson test] driver-tests/link_bonding_mode4_autotest bond handshake failed. No fix yet.

Best regards,
Yu Jiang

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

end of thread, other threads:[~2022-11-17  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10  7:32 [dts][PATCH V1 1/2] tests/meson_tests: modify meson_tests suite to support test config in conf Weiyuan Li
2022-11-10  7:32 ` [dts][PATCH V1 2/2] conf/meson_tests: " Weiyuan Li
2022-11-17  8:01   ` Jiang, YuX

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