test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build
@ 2020-09-10  1:12 LihongX Ma
  2020-09-10  8:51 ` Ling, WeiX
  2020-09-15  8:33 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: LihongX Ma @ 2020-09-10  1:12 UTC (permalink / raw)
  To: dts; +Cc: weix.ling, LihongX Ma

add support for build all examples in suite

Signed-off-by: LihongX Ma <lihongx.ma@intel.com>
---
 framework/project_dpdk.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index b5727ef..c1b5eaf 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -543,18 +543,22 @@ class DPDKdut(Dut):
 
         folder_info = folder.split('/')
         name = folder_info[-1]
-        if name not in self.apps_name:
+        if name != 'examples' and name not in self.apps_name:
             raise Exception('Please config %s file path on conf/app_name.cfg' % name)
 
-        example = '/'.join(folder_info[folder_info.index('examples')+1:])
+        if name == 'examples':
+            example = 'all'
+        else:
+            example = '/'.join(folder_info[folder_info.index('examples')+1:])
         out = self.send_expect("meson configure -Dexamples=%s %s" % (example, self.target), "# ")
         assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
         out = self.send_expect("ninja -C %s" % self.target, "# ", timeout)
         assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
 
         # verify the app build in the config path
-        out = self.send_expect('ls %s' % self.apps_name[name], "# ", verify=True)
-        assert(isinstance(out, str)), 'please confirm %s app path and name in app_name.cfg' % name
+        if example != 'all':
+            out = self.send_expect('ls %s' % self.apps_name[name], "# ", verify=True)
+            assert(isinstance(out, str)), 'please confirm %s app path and name in app_name.cfg' % name
 
         return out
 
-- 
2.7.4


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

* Re: [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build
  2020-09-10  1:12 [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build LihongX Ma
@ 2020-09-10  8:51 ` Ling, WeiX
  2020-09-15  8:33 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Ling, WeiX @ 2020-09-10  8:51 UTC (permalink / raw)
  To: Ma, LihongX, dts

[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]

Tested-by: Ling, Wei<weix.ling@intel.com>

Regards,
Ling Wei

-----Original Message-----
From: Ma, LihongX <lihongx.ma@intel.com> 
Sent: Thursday, September 10, 2020 09:13 AM
To: dts@dpdk.org
Cc: Ling, WeiX <weix.ling@intel.com>; Ma, LihongX <lihongx.ma@intel.com>
Subject: [dts][PATCH V1] framework/project_dpdk: add examples/all build for meson build

add support for build all examples in suite

Signed-off-by: LihongX Ma <lihongx.ma@intel.com>
---
 framework/project_dpdk.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index b5727ef..c1b5eaf 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -543,18 +543,22 @@ class DPDKdut(Dut):
 
         folder_info = folder.split('/')
         name = folder_info[-1]
-        if name not in self.apps_name:
+        if name != 'examples' and name not in self.apps_name:
             raise Exception('Please config %s file path on conf/app_name.cfg' % name)
 
-        example = '/'.join(folder_info[folder_info.index('examples')+1:])
+        if name == 'examples':
+            example = 'all'
+        else:
+            example = 
+ '/'.join(folder_info[folder_info.index('examples')+1:])
         out = self.send_expect("meson configure -Dexamples=%s %s" % (example, self.target), "# ")
         assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
         out = self.send_expect("ninja -C %s" % self.target, "# ", timeout)
         assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
 
         # verify the app build in the config path
-        out = self.send_expect('ls %s' % self.apps_name[name], "# ", verify=True)
-        assert(isinstance(out, str)), 'please confirm %s app path and name in app_name.cfg' % name
+        if example != 'all':
+            out = self.send_expect('ls %s' % self.apps_name[name], "# ", verify=True)
+            assert(isinstance(out, str)), 'please confirm %s app path 
+ and name in app_name.cfg' % name
 
         return out
 
--
2.7.4


[-- Attachment #2: TestTSO.log --]
[-- Type: application/octet-stream, Size: 76026 bytes --]

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

* Re: [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build
  2020-09-10  1:12 [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build LihongX Ma
  2020-09-10  8:51 ` Ling, WeiX
@ 2020-09-15  8:33 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-09-15  8:33 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ling, WeiX, Ma, LihongX

> Subject: [dts] [PATCH V1] framework/project_dpdk: add examples/all build for
> meson build
> 
> add support for build all examples in suite
> 
> Signed-off-by: LihongX Ma <lihongx.ma@intel.com>

Applied

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

end of thread, other threads:[~2020-09-15  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10  1:12 [dts] [PATCH V1] framework/project_dpdk: add examples/all build for meson build LihongX Ma
2020-09-10  8:51 ` Ling, WeiX
2020-09-15  8:33 ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	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

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


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