All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: linux-staging@lists.linux.dev
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	"Spencer E . Olson" <olsonse@umich.edu>
Subject: [PATCH 6/6] staging: comedi: Add Kconfig options to build unit test modules
Date: Wed,  7 Apr 2021 18:53:07 +0100	[thread overview]
Message-ID: <20210407175307.1114472-7-abbotti@mev.co.uk> (raw)
In-Reply-To: <20210407175307.1114472-1-abbotti@mev.co.uk>

The comedi unit-test modules in "drivers/staging/comedi/drivers/tests/"
are built if the `CONFIG_COMEDI_TESTS` option is enabled, but the comedi
Kconfig file contains no code to enable the option.  Add config options
to allow each of the unit-test modules to be enabled individually.  The
"ni_route_tests" module depends on the "ni_routing" module, so select it
if the "ni_route_tests" module is configured to be built.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/Kconfig                | 33 +++++++++++++++++++
 drivers/staging/comedi/drivers/tests/Makefile |  4 +--
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 049b659fa6ad..1fbc517f4276 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -1319,4 +1319,37 @@ config COMEDI_NI_TIO
 config COMEDI_NI_ROUTING
 	tristate
 
+config COMEDI_TESTS
+	tristate "Comedi unit tests"
+	help
+	  Enable comedi unit-test modules to be built.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about comedi unit-test modules.
+
+if COMEDI_TESTS
+
+config COMEDI_TESTS_EXAMPLE
+	tristate "Comedi example unit-test module"
+	help
+	  Enable support for an example unit-test module.  This is just a
+	  silly example to be used as a basis for writing other unit-test
+	  modules.
+
+	  To compile this as a module, choose M here: the module will be called
+	  comedi_example_test.
+
+config COMEDI_TESTS_NI_ROUTES
+	tristate "NI routing unit-test module"
+	select NI_ROUTING
+	help
+	  Enable support for a unit-test module to test the signal routing
+	  code used by comedi drivers for various National Instruments cards.
+
+	  To compile this as a module, choose M here: the module will be called
+	  ni_routes_test.
+
+endif # COMEDI_TESTS
+
 endif # COMEDI
diff --git a/drivers/staging/comedi/drivers/tests/Makefile b/drivers/staging/comedi/drivers/tests/Makefile
index a7883e406c43..5ff7cdc32a32 100644
--- a/drivers/staging/comedi/drivers/tests/Makefile
+++ b/drivers/staging/comedi/drivers/tests/Makefile
@@ -3,6 +3,6 @@
 #
 ccflags-$(CONFIG_COMEDI_DEBUG)		:= -DDEBUG
 
-obj-$(CONFIG_COMEDI_TESTS)		+= comedi_example_test.o
-obj-$(CONFIG_COMEDI_TESTS)		+= ni_routes_test.o
+obj-$(CONFIG_COMEDI_TESTS_EXAMPLE)	+= comedi_example_test.o
+obj-$(CONFIG_COMEDI_TESTS_NI_ROUTES)	+= ni_routes_test.o
 CFLAGS_ni_routes_test.o			:= -DDEBUG
-- 
2.31.0


  parent reply	other threads:[~2021-04-07 18:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 17:53 [PATCH 0/6] staging: comedi: tests: Fix a few more issues Ian Abbott
2021-04-07 17:53 ` [PATCH 1/6] staging: comedi: tests: ni_routes_test: Reduce stack usage Ian Abbott
2021-04-07 17:57   ` Ian Abbott
2021-04-07 17:53 ` [PATCH 2/6] staging: comedi: tests: ni_route_tests: Declare functions static Ian Abbott
2021-04-07 17:53 ` [PATCH 3/6] staging: comedi: tests: example_test: Reduce stack usage Ian Abbott
2021-04-07 17:56   ` Ian Abbott
2021-04-07 17:53 ` [PATCH 4/6] staging: comedi: tests: example_test: Declare functions static Ian Abbott
2021-04-07 17:53 ` [PATCH 5/6] staging: comedi: tests: example_test: Rename to 'comedi_example_test' Ian Abbott
2021-04-07 17:53 ` Ian Abbott [this message]
2021-04-07 18:13 ` [PATCH v2 0/6] staging: comedi: tests: Fix a few more issues Ian Abbott
2021-04-07 18:13   ` [PATCH v2 1/6] staging: comedi: tests: ni_routes_test: Reduce stack usage Ian Abbott
2021-04-07 18:13   ` [PATCH v2 2/6] staging: comedi: tests: ni_route_tests: Declare functions static Ian Abbott
2021-04-07 18:13   ` [PATCH v2 3/6] staging: comedi: tests: example_test: Reduce stack usage Ian Abbott
2021-04-07 18:13   ` [PATCH v2 4/6] staging: comedi: tests: example_test: Declare functions static Ian Abbott
2021-04-07 18:13   ` [PATCH v2 5/6] staging: comedi: tests: example_test: Rename to 'comedi_example_test' Ian Abbott
2021-04-07 18:13   ` [PATCH v2 6/6] staging: comedi: Add Kconfig options to build unit test modules Ian Abbott
2021-04-07 18:14 ` [PATCH 0/6] staging: comedi: tests: Fix a few more issues Spencer Olson

Reply instructions:

You may reply publicly 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=20210407175307.1114472-7-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=olsonse@umich.edu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.