test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] remove re-compile test app in unit test
@ 2016-10-13  6:22 xu,huilong
  2016-10-14 14:56 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,huilong @ 2016-10-13  6:22 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

all unit test suit will re-compile test app,
So used RTE_SDK/RTE_TARGET/app/test to replace RTE_SDK/app/test/test
for run unit test case. and not need re-compile test app.

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_unit_tests_cmdline.py |  9 +---
 tests/TestSuite_unit_tests_eal.py     | 80 +++++++++++++++++------------------
 tests/TestSuite_unit_tests_kni.py     |  4 +-
 tests/TestSuite_unit_tests_lpm.py     |  8 ++--
 tests/TestSuite_unit_tests_mbuf.py    |  6 +--
 tests/TestSuite_unit_tests_mempool.py |  8 ++--
 tests/TestSuite_unit_tests_power.py   |  8 ++--
 tests/TestSuite_unit_tests_qos.py     | 10 ++---
 tests/TestSuite_unit_tests_ring.py    |  8 ++--
 tests/TestSuite_unit_tests_timer.py   |  8 ++--
 10 files changed, 62 insertions(+), 87 deletions(-)

diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py
index e3a29ee..93faf49 100644
--- a/tests/TestSuite_unit_tests_cmdline.py
+++ b/tests/TestSuite_unit_tests_cmdline.py
@@ -57,12 +57,7 @@ class TestUnitTestsCmdline(TestCase):
         Run at the start of each test suite.
         """
         # icc compilation cost long long time.
-        if "icc" in self.target:
-            out = self.dut.send_expect("make -j -C ./app/test/", "# ", 300)
-        else:
-            out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -74,7 +69,7 @@ class TestUnitTestsCmdline(TestCase):
         Run cmdline autotests in RTE comand line.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("cmdline_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py
index e8ea20b..8fea148 100644
--- a/tests/TestSuite_unit_tests_eal.py
+++ b/tests/TestSuite_unit_tests_eal.py
@@ -31,14 +31,10 @@ class TestUnitTestsEal(TestCase):
         Run at the start of each test suite.
         """
         # icc compilation cost long long time.
-        if "icc" in self.target:
-            out = self.dut.send_expect("make -j -C ./app/test/", "# ", 300)
-        else:
-            out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
         [arch, machine, self.env, toolchain] = self.target.split('-')
         self.start_test_time = 60
         self.run_cmd_time = 180
+        self.test_app_cmdline = "./%s/app/test -n 1 -c ffff" % self.target
 
     def set_up(self):
         """
@@ -51,7 +47,7 @@ class TestUnitTestsEal(TestCase):
         Run version autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' + self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("version_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -62,7 +58,7 @@ class TestUnitTestsEal(TestCase):
         Run memcopy autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' +  self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("memcpy_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -73,7 +69,7 @@ class TestUnitTestsEal(TestCase):
         Run common autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' + self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("common_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -84,7 +80,7 @@ class TestUnitTestsEal(TestCase):
         Run memcopy autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' + self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("eal_fs_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -95,7 +91,7 @@ class TestUnitTestsEal(TestCase):
         Run memcopy autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' + self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("memcpy_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -105,7 +101,7 @@ class TestUnitTestsEal(TestCase):
         """
         Run memcopy performance autotest.
         """
-        self.dut.send_expect("%s ./app/test/test -n 1 -c ffff" % self.dut.taskset(1),
+        self.dut.send_expect(self.dut.taskset(1) + ' ' + self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("memcpy_perf_autotest", "RTE>>", self.run_cmd_time * 15)
         self.dut.send_expect("quit", "# ")
@@ -116,7 +112,7 @@ class TestUnitTestsEal(TestCase):
         Run hash autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("hash_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -126,7 +122,7 @@ class TestUnitTestsEal(TestCase):
         Run has performance autotest.
         """
 
-        self.dut.send_expect("%s ./app/test/test -n 1 -c fffe" % self.dut.taskset(1),
+        self.dut.send_expect(self.test_app_cmdline,
                              "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("hash_perf_autotest", "RTE>>", self.run_cmd_time * 10)
         self.dut.send_expect("quit", "# ")
@@ -137,7 +133,7 @@ class TestUnitTestsEal(TestCase):
         Run malloc autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("malloc_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -148,10 +144,10 @@ class TestUnitTestsEal(TestCase):
         """
 
         if self.dut.architecture == "x86_64":
-            cmdline = "./app/test/test -n 1 -c ffff"
+            cmdline = self.test_app_cmdline
         else:
             # mask cores only on socket 0
-            cmdline = "%s ./app/test/test -n 1 -c 5555" % self.dut.taskset(1)
+            cmdline = "%s ./%s/app/test -n 1 -c 5555" % (self.dut.taskset(1), self.target)
         self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
@@ -161,8 +157,8 @@ class TestUnitTestsEal(TestCase):
         """
         Run pci autotest.
         """
-
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        # should re-compile test app, this is only a demo. will implementation after framework support
+        self.dut.send_expect("./%s/app/test_pci -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>" , self.start_test_time)
         out = self.dut.send_expect("pci_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -172,7 +168,7 @@ class TestUnitTestsEal(TestCase):
         Run atomic autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("atomic_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -182,7 +178,7 @@ class TestUnitTestsEal(TestCase):
         Run memory autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect('memory_autotest', "RTE>>", self.run_cmd_time * 5)
         regexp = "phys:0x[0-9a-f]*, len:([0-9a-f]*), virt:0x[0-9a-f]*, socket_id:[0-9]*"
         match = utils.regexp(out, regexp)
@@ -195,7 +191,7 @@ class TestUnitTestsEal(TestCase):
         Run lcore autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("per_lcore_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -205,7 +201,7 @@ class TestUnitTestsEal(TestCase):
         Run spinlock autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("spinlock_autotest", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -215,7 +211,7 @@ class TestUnitTestsEal(TestCase):
         Run rwlock autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("rwlock_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -225,7 +221,7 @@ class TestUnitTestsEal(TestCase):
         Run prefetch autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("prefetch_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -235,7 +231,7 @@ class TestUnitTestsEal(TestCase):
         Run byte order autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("byteorder_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -245,7 +241,7 @@ class TestUnitTestsEal(TestCase):
         Run cycles autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("cycles_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -255,7 +251,7 @@ class TestUnitTestsEal(TestCase):
         Run logs autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("logs_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -265,7 +261,7 @@ class TestUnitTestsEal(TestCase):
         Run memzone autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("memzone_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -275,7 +271,7 @@ class TestUnitTestsEal(TestCase):
         Run debug autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("debug_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -285,7 +281,7 @@ class TestUnitTestsEal(TestCase):
         Run eal flags autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff -m 64", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline + ' -m 64', "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("eal_flags_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -296,7 +292,7 @@ class TestUnitTestsEal(TestCase):
         """
 
         self.verify(self.env == "linuxapp", "Alarm only supported in linux env")
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("alarm_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -306,7 +302,7 @@ class TestUnitTestsEal(TestCase):
         Run CPU flags autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("cpuflags_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -316,7 +312,7 @@ class TestUnitTestsEal(TestCase):
         Run errno autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", self.start_test_time)
         out = self.dut.send_expect("errno_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -327,7 +323,7 @@ class TestUnitTestsEal(TestCase):
         """
 
         self.verify(self.env == "linuxapp", "Interrupt only supported in linux env")
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*TE>>|RT.*E>>|RTE.*>>|RTE>.*>", self.start_test_time)
         out = self.dut.send_expect("interrupt_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -337,7 +333,7 @@ class TestUnitTestsEal(TestCase):
         Run multiprocess autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff -m 64", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline + ' -m 64', "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("multiprocess_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -347,7 +343,7 @@ class TestUnitTestsEal(TestCase):
         Run string autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("string_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -357,7 +353,7 @@ class TestUnitTestsEal(TestCase):
         Run tailq autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("tailq_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -367,7 +363,7 @@ class TestUnitTestsEal(TestCase):
         Run devargs autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("devargs_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -377,7 +373,7 @@ class TestUnitTestsEal(TestCase):
         Run kvargs autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("kvargs_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -387,7 +383,7 @@ class TestUnitTestsEal(TestCase):
         Run acl autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("acl_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -397,7 +393,7 @@ class TestUnitTestsEal(TestCase):
         Run acl autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("link_bonding_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -405,7 +401,7 @@ class TestUnitTestsEal(TestCase):
     def test_link_bonding_rssconf(self):
         """
         """
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", self.start_test_time)
+        self.dut.send_expect(self.test_app_cmdline, "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("link_bonding_rssconf_autotest", "RTE>>", self.run_cmd_time)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py
index 20df8cc..ea8ef79 100644
--- a/tests/TestSuite_unit_tests_kni.py
+++ b/tests/TestSuite_unit_tests_kni.py
@@ -72,8 +72,6 @@ class TestUnitTestsKni(TestCase):
 
         KNI Prerequisites
         """
-        out = self.dut.send_expect("make -C ./app/test/", "# ", 120)
-        self.verify('make: Leaving directory' in out, "Compilation failed")
 
         self.insmod_kni()
 
@@ -87,7 +85,7 @@ class TestUnitTestsKni(TestCase):
         """
         Run kni autotest.
         """
-        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("kni_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
 
diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py
index d892916..4a26e03 100644
--- a/tests/TestSuite_unit_tests_lpm.py
+++ b/tests/TestSuite_unit_tests_lpm.py
@@ -59,9 +59,7 @@ class TestUnitTestsLpmIpv6(TestCase):
 
         Qos Prerequisites
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -72,7 +70,7 @@ class TestUnitTestsLpmIpv6(TestCase):
         """
         Run lpm for IPv6 autotest.
         """
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "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")
@@ -91,7 +89,7 @@ class TestUnitTestsLpmIpv6(TestCase):
             hugepage_num = self.dut.get_total_huge_pages()
             self.verify(hugepage_num >= 4096, "failed to request huge memory")
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600)
         self.dut.send_expect("quit", "# ")
         if env == 'bsdapp':
diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py
index c4dfaab..df73e5d 100644
--- a/tests/TestSuite_unit_tests_mbuf.py
+++ b/tests/TestSuite_unit_tests_mbuf.py
@@ -56,9 +56,7 @@ class TestUnitTestsMbuf(TestCase):
         """
         Run at the start of each test suite.
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -70,7 +68,7 @@ class TestUnitTestsMbuf(TestCase):
         Run mbuf autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py
index 0e4c211..70cf4f3 100644
--- a/tests/TestSuite_unit_tests_mempool.py
+++ b/tests/TestSuite_unit_tests_mempool.py
@@ -56,9 +56,7 @@ class TestUnitTestsMempool(TestCase):
         """
         Run at the start of each test suite.
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -70,7 +68,7 @@ class TestUnitTestsMempool(TestCase):
         Run memory pool autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("mempool_autotest", "RTE>>", 120)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -79,7 +77,7 @@ class TestUnitTestsMempool(TestCase):
         """
         Run memory pool performance autotest.
         """
-        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_power.py b/tests/TestSuite_unit_tests_power.py
index c4075a7..970e0a6 100644
--- a/tests/TestSuite_unit_tests_power.py
+++ b/tests/TestSuite_unit_tests_power.py
@@ -57,9 +57,7 @@ class TestUnitTestsPower(TestCase):
 
         Power Prerequisites
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -71,7 +69,7 @@ class TestUnitTestsPower(TestCase):
         Run power autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "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")
@@ -81,7 +79,7 @@ class TestUnitTestsPower(TestCase):
         Run power acpi cpu frequency autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("power_acpi_cpufreq_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py
index 5b8e023..1bc5f8d 100644
--- a/tests/TestSuite_unit_tests_qos.py
+++ b/tests/TestSuite_unit_tests_qos.py
@@ -58,9 +58,7 @@ class TestUnitTestsQos(TestCase):
 
         Qos Prerequisites
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -72,7 +70,7 @@ class TestUnitTestsQos(TestCase):
         Run RED autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30)
         out = self.dut.send_expect("red_autotest", "RTE>>", 180)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -82,7 +80,7 @@ class TestUnitTestsQos(TestCase):
         Run meter autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30)
         out = self.dut.send_expect("meter_autotest", "RTE>>", 5)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -95,7 +93,7 @@ class TestUnitTestsQos(TestCase):
         [arch, machine, env, toolchain] = self.target.split('-')
         self.verify(arch == "x86_64", "Sched auto_test not support in i686")
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 30)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30)
         out = self.dut.send_expect("sched_autotest", "RTE>>", 5)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py
index d542539..baa6610 100644
--- a/tests/TestSuite_unit_tests_ring.py
+++ b/tests/TestSuite_unit_tests_ring.py
@@ -56,9 +56,7 @@ class TestUnitTestsRing(TestCase):
         """
         Run at the start of each test suite.
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -70,7 +68,7 @@ class TestUnitTestsRing(TestCase):
         Run ring autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("ring_autotest", "RTE>>", 36000)
         self.verify("Test OK" in out, "Test failed")
         self.dut.send_expect("set_watermark test 100", "RTE>>")
@@ -83,7 +81,7 @@ class TestUnitTestsRing(TestCase):
         Run ring performance autotest.
         """
 
-        self.dut.send_expect("./app/test/test -n 1 -c fffe", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py
index 774de5d..2d5eb49 100644
--- a/tests/TestSuite_unit_tests_timer.py
+++ b/tests/TestSuite_unit_tests_timer.py
@@ -56,9 +56,7 @@ class TestUnitTestsTimer(TestCase):
         """
         Run at the start of each test suite.
         """
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-
+        pass
     def set_up(self):
         """
         Run before each test case.
@@ -69,7 +67,7 @@ class TestUnitTestsTimer(TestCase):
         """
         Run timer autotest.
         """
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("timer_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
@@ -78,7 +76,7 @@ class TestUnitTestsTimer(TestCase):
         """
         Run timer autotest.
         """
-        self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
-- 
1.9.3

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

end of thread, other threads:[~2016-10-14 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13  6:22 [dts] [PATCH V1] remove re-compile test app in unit test xu,huilong
2016-10-14 14:56 ` Liu, Yong

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