[v2,1/5] test/cmdline_test: move to app directory
Checks
Commit Message
Move app to "app" directory and enable with meson build.
CC: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
MAINTAINERS | 2 +-
app/Makefile | 1 +
{test => app}/cmdline_test/Makefile | 0
{test => app}/cmdline_test/cmdline_test.c | 0
{test => app}/cmdline_test/cmdline_test.h | 0
{test => app}/cmdline_test/cmdline_test.py | 0
{test => app}/cmdline_test/cmdline_test_data.py | 0
{test => app}/cmdline_test/commands.c | 0
app/cmdline_test/meson.build | 5 +++++
app/meson.build | 3 ++-
test/Makefile | 1 -
11 files changed, 9 insertions(+), 3 deletions(-)
rename {test => app}/cmdline_test/Makefile (100%)
rename {test => app}/cmdline_test/cmdline_test.c (100%)
rename {test => app}/cmdline_test/cmdline_test.h (100%)
rename {test => app}/cmdline_test/cmdline_test.py (100%)
rename {test => app}/cmdline_test/cmdline_test_data.py (100%)
rename {test => app}/cmdline_test/commands.c (100%)
create mode 100644 app/cmdline_test/meson.build
Comments
19/02/2019 15:53, Bruce Richardson:
> Move app to "app" directory and enable with meson build.
>
> CC: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> MAINTAINERS | 2 +-
> app/Makefile | 1 +
> {test => app}/cmdline_test/Makefile | 0
> {test => app}/cmdline_test/cmdline_test.c | 0
> {test => app}/cmdline_test/cmdline_test.h | 0
> {test => app}/cmdline_test/cmdline_test.py | 0
> {test => app}/cmdline_test/cmdline_test_data.py | 0
> {test => app}/cmdline_test/commands.c | 0
Sorry, I didn't realize before,
other test apps directories are named test-*.
Shouldn't we name this one test-cmdline?
On Tue, Feb 26, 2019 at 10:14:08AM +0100, Thomas Monjalon wrote:
> 19/02/2019 15:53, Bruce Richardson:
> > Move app to "app" directory and enable with meson build.
> >
> > CC: Olivier Matz <olivier.matz@6wind.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > MAINTAINERS | 2 +-
> > app/Makefile | 1 +
> > {test => app}/cmdline_test/Makefile | 0
> > {test => app}/cmdline_test/cmdline_test.c | 0
> > {test => app}/cmdline_test/cmdline_test.h | 0
> > {test => app}/cmdline_test/cmdline_test.py | 0
> > {test => app}/cmdline_test/cmdline_test_data.py | 0
> > {test => app}/cmdline_test/commands.c | 0
>
> Sorry, I didn't realize before,
> other test apps directories are named test-*.
> Shouldn't we name this one test-cmdline?
>
Probably not a bad idea.
On Tue, Feb 26, 2019 at 10:14:08AM +0100, Thomas Monjalon wrote:
> 19/02/2019 15:53, Bruce Richardson:
> > Move app to "app" directory and enable with meson build.
> >
> > CC: Olivier Matz <olivier.matz@6wind.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > MAINTAINERS | 2 +-
> > app/Makefile | 1 +
> > {test => app}/cmdline_test/Makefile | 0
> > {test => app}/cmdline_test/cmdline_test.c | 0
> > {test => app}/cmdline_test/cmdline_test.h | 0
> > {test => app}/cmdline_test/cmdline_test.py | 0
> > {test => app}/cmdline_test/cmdline_test_data.py | 0
> > {test => app}/cmdline_test/commands.c | 0
>
> Sorry, I didn't realize before,
> other test apps directories are named test-*.
> Shouldn't we name this one test-cmdline?
>
Looking into it now, changing the directory name is easy enough, however
the final binary produced is also called cmdline_test - should it be
changed too? Changing it would be a bit more invasive, and would be
user-visible (perhaps just to test suites), but would lead to more
consistency.
NOTE: this only applies to the "make" build, since the meson build uses the
directory name as the binary name, so it's already consistent. There is no
user visible change here, since the app wasn't available from meson builds
before.
My recommendation is therefore to rename the directory only, and leave the
binary name the same for make builds, given that when we switch completely
over to meson it will be consistent at that point.
Thoughts, Thomas?
/Bruce
On Tue, Feb 26, 2019 at 11:24:28AM +0000, Bruce Richardson wrote:
> On Tue, Feb 26, 2019 at 10:14:08AM +0100, Thomas Monjalon wrote:
> > 19/02/2019 15:53, Bruce Richardson:
> > > Move app to "app" directory and enable with meson build.
> > >
> > > CC: Olivier Matz <olivier.matz@6wind.com>
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > > MAINTAINERS | 2 +-
> > > app/Makefile | 1 +
> > > {test => app}/cmdline_test/Makefile | 0
> > > {test => app}/cmdline_test/cmdline_test.c | 0
> > > {test => app}/cmdline_test/cmdline_test.h | 0
> > > {test => app}/cmdline_test/cmdline_test.py | 0
> > > {test => app}/cmdline_test/cmdline_test_data.py | 0
> > > {test => app}/cmdline_test/commands.c | 0
> >
> > Sorry, I didn't realize before,
> > other test apps directories are named test-*.
> > Shouldn't we name this one test-cmdline?
> >
> Looking into it now, changing the directory name is easy enough, however
> the final binary produced is also called cmdline_test - should it be
> changed too? Changing it would be a bit more invasive, and would be
> user-visible (perhaps just to test suites), but would lead to more
> consistency.
>
> NOTE: this only applies to the "make" build, since the meson build uses the
> directory name as the binary name, so it's already consistent. There is no
> user visible change here, since the app wasn't available from meson builds
> before.
>
> My recommendation is therefore to rename the directory only, and leave the
> binary name the same for make builds, given that when we switch completely
> over to meson it will be consistent at that point.
>
Implemented in V3 patchset.
@@ -1168,7 +1168,7 @@ F: test/test/test_cfgfiles/
Interactive command line
M: Olivier Matz <olivier.matz@6wind.com>
F: lib/librte_cmdline/
-F: test/cmdline_test/
+F: app/cmdline_test/
F: test/test/test_cmdline*
F: examples/cmdline/
F: doc/guides/sample_app_ug/cmd_line.rst
@@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
DIRS-$(CONFIG_RTE_PROC_INFO) += proc-info
DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
+DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test
ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y)
DIRS-$(CONFIG_RTE_TEST_BBDEV) += test-bbdev
similarity index 100%
rename from test/cmdline_test/Makefile
rename to app/cmdline_test/Makefile
similarity index 100%
rename from test/cmdline_test/cmdline_test.c
rename to app/cmdline_test/cmdline_test.c
similarity index 100%
rename from test/cmdline_test/cmdline_test.h
rename to app/cmdline_test/cmdline_test.h
similarity index 100%
rename from test/cmdline_test/cmdline_test.py
rename to app/cmdline_test/cmdline_test.py
similarity index 100%
rename from test/cmdline_test/cmdline_test_data.py
rename to app/cmdline_test/cmdline_test_data.py
similarity index 100%
rename from test/cmdline_test/commands.c
rename to app/cmdline_test/commands.c
new file mode 100644
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+sources = files('commands.c', 'cmdline_test.c')
+deps += 'cmdline'
@@ -1,7 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-apps = ['pdump',
+apps = ['cmdline_test',
+ 'pdump',
'proc-info',
'test-bbdev',
'test-compress-perf',
@@ -6,6 +6,5 @@ include $(RTE_SDK)/mk/rte.vars.mk
DIRS-$(CONFIG_RTE_APP_TEST) += test
DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl
DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline
-DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test
include $(RTE_SDK)/mk/rte.subdir.mk