test suite reviews and discussions
 help / color / Atom feed
From: hanyingya <yingyax.han@intel.com>
To: dts@dpdk.org
Cc: hanyingya <yingyax.han@intel.com>
Subject: [dts] [PATCH V1]tests/multiple_pthread: replace the hard code
Date: Thu, 24 Oct 2019 16:57:44 +0000
Message-ID: <20191024165744.73427-1-yingyax.han@intel.com> (raw)

replace the hard code and support for more platforms.

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 tests/TestSuite_multiple_pthread.py | 36 ++++++++++++++---------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py
index 1ea71a5..b59f047 100644
--- a/tests/TestSuite_multiple_pthread.py
+++ b/tests/TestSuite_multiple_pthread.py
@@ -130,7 +130,7 @@ class TestMultiplePthread(TestCase):
         self.result_table_create(header_row)
         self.out_view['data'] = []
 
-        cmdline = './x86_64-native-linuxapp-gcc/app/testpmd --lcores="%s" -n 4 -- -i' % lcores
+        cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i' % (self.target, lcores)
         # start application
         self.dut.send_expect(cmdline, "testpmd", 60)
 
@@ -206,25 +206,25 @@ class TestMultiplePthread(TestCase):
         """
         Test an random parameter from an defined table which has a couple of invalid lcore parameters.
         """
-        cmdline_list = ["./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0-,4-7)@(4,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(-1,4-7)@(4,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,abcd)@(4,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(1-,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(-1,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(abc,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)=(8,9)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='[0-,4-7]@(4,5)' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0-,4-7)@[4,5]' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,,3''2--3' -n 4 -- -i",
-                        "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,,,3''2--3' -n 4 -- -i"]
+        cmdline_list = ["./%s/app/testpmd --lcores='(0-,4-7)@(4,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(-1,4-7)@(4,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,abcd)@(4,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)@(1-,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)@(-1,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)@(abc,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0,4-7)=(8,9)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='[0-,4-7]@(4,5)' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='(0-,4-7)@[4,5]' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='2,,3''2--3' -n 4 -- -i",
+                        "./%s/app/testpmd --lcores='2,,,3''2--3' -n 4 -- -i"]
 
         cmdline = random.sample(cmdline_list, 1)
-        out = self.dut.send_expect(cmdline[0], "#", 60)
+        out = self.dut.send_expect(cmdline[0] % self.target, "#", 60)
         self.verify("invalid parameter" in out, "it's a valid parameter")
 
     def tear_down(self):
-- 
2.17.1


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024165744.73427-1-yingyax.han@intel.com \
    --to=yingyax.han@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox