[dts] [PATCH V1] tests:change the methods of build example apps

changqingxwu changqingx.wu at intel.com
Wed May 29 10:40:41 CEST 2019


Avoid finding not the RTE_SDK variable when compiling dpdk or example/app, 
and modifying the compilation method.

Signed-off-by: changqingxwu <changqingx.wu at intel.com>
---
 tests/TestSuite_kni.py               | 2 +-
 tests/TestSuite_l3fwdacl.py          | 2 +-
 tests/TestSuite_loadbalancer.py      | 2 +-
 tests/TestSuite_ptpclient.py         | 2 +-
 tests/TestSuite_quota_watermark.py   | 2 +-
 tests/TestSuite_userspace_ethtool.py | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py
index 641d8b0..aa189f5 100644
--- a/tests/TestSuite_kni.py
+++ b/tests/TestSuite_kni.py
@@ -261,7 +261,7 @@ class TestKni(TestCase):
         self.dut.send_expect("sed -i -e 's/KNI_KMOD_ETHTOOL=n$/KNI_KMOD_ETHTOOL=y/' config/common_base", "# ", 30)
         self.dut.build_install_dpdk(self.target)
 
-        out = self.dut.send_expect("make -C ./examples/kni/", "# ", 5)
+        out = self.dut.build_dpdk_apps("./examples/kni/")
         self.verify('Error' not in out, "Compilation failed")
 
         self.extract_ports_cores_config(default_1_port_cores_config)
diff --git a/tests/TestSuite_l3fwdacl.py b/tests/TestSuite_l3fwdacl.py
index 221417a..9d1c41e 100644
--- a/tests/TestSuite_l3fwdacl.py
+++ b/tests/TestSuite_l3fwdacl.py
@@ -652,7 +652,7 @@ class TestL3fwdacl(TestCase):
         TestL3fwdacl.default_rule["Port"] = self.dut_ports[1]
 
         # compile l3fwd-acl
-        out = self.dut.send_expect("make -C examples/l3fwd-acl", "# ")
+        out = self.dut.build_dpdk_apps("examples/l3fwd-acl")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
 
diff --git a/tests/TestSuite_loadbalancer.py b/tests/TestSuite_loadbalancer.py
index fdda939..9152c6c 100644
--- a/tests/TestSuite_loadbalancer.py
+++ b/tests/TestSuite_loadbalancer.py
@@ -55,7 +55,7 @@ class TestLoadbalancer(TestCase):
             "Flow4": [rx_port3, "1.0.3.1"],
         }
 
-        out = self.dut.send_expect("make -C examples/load_balancer", "#")
+        out = self.dut.build_dpdk_apps("examples/load_balancer")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
 
diff --git a/tests/TestSuite_ptpclient.py b/tests/TestSuite_ptpclient.py
index 27d0714..23590e4 100644
--- a/tests/TestSuite_ptpclient.py
+++ b/tests/TestSuite_ptpclient.py
@@ -59,7 +59,7 @@ class TestPtpClient(TestCase):
         self.dut.build_install_dpdk(self.target)
 
         # build sample app
-        out = self.dut.send_expect("make -C examples/ptpclient", "# ")
+        out = self.dut.build_dpdk_apps("examples/ptpclient")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
 
diff --git a/tests/TestSuite_quota_watermark.py b/tests/TestSuite_quota_watermark.py
index aabb2fd..ad4ec3b 100644
--- a/tests/TestSuite_quota_watermark.py
+++ b/tests/TestSuite_quota_watermark.py
@@ -112,7 +112,7 @@ class TestQuotaWatermark(TestCase, IxiaPacketGenerator):
         Builds the example app and checks for errors.
         """
 
-        out = self.dut.send_expect("make -C examples/quota_watermark", "# ")
+        out = self.dut.build_dpdk_apps("examples/quota_watermark")
         self.verify("Error" not in out and "No such file" not in out,
                     "Compilation error")
 
diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index f8428ea..dba988b 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -58,7 +58,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
         self.verify(len(self.ports) >= 2, "No ports found for " + self.nic)
 
         # build sample app
-        out = self.dut.send_expect("make -C examples/ethtool", "# ")
+        out = self.dut.build_dpdk_apps("examples/ethtool")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
 
@@ -80,7 +80,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
         pass
 
     def build_ethtool(self):
-        out = self.dut.send_expect("make -C examples/ethtool", "# ")
+        out = self.dut.build_dpdk_apps("examples/ethtool")
         self.verify("Error" not in out, "compilation error 1")
         self.verify("No such file" not in out, "compilation error 2")
 
-- 
2.17.2



More information about the dts mailing list