All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 10/15] dm: Allow driver model tests only for sandbox
Date: Tue, 10 Jun 2014 17:53:43 -0600	[thread overview]
Message-ID: <1402444428-11356-11-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1402444428-11356-1-git-send-email-sjg@chromium.org>

The GPIO tests require the sandbox GPIO driver, so cannot be run on other
platforms. Similarly for the 'dm test' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to allow driver model tests only for sandbox

 test/dm/Makefile |  2 ++
 test/dm/cmd_dm.c | 11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/dm/Makefile b/test/dm/Makefile
index 4e9afe6..c0f2135 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -15,4 +15,6 @@ obj-$(CONFIG_DM_TEST) += ut.o
 # subsystem you must add sandbox tests here.
 obj-$(CONFIG_DM_TEST) += core.o
 obj-$(CONFIG_DM_TEST) += ut.o
+ifneq ($(CONFIG_SANDBOX),)
 obj-$(CONFIG_DM_GPIO) += gpio.o
+endif
diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 083f15c..180661b 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -93,16 +93,23 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
+#ifdef CONFIG_DM_TEST
 static int do_dm_test(cmd_tbl_t *cmdtp, int flag, int argc,
 			  char * const argv[])
 {
 	return dm_test_main();
 }
+#define TEST_HELP "\ndm test         Run tests"
+#else
+#define TEST_HELP
+#endif
 
 static cmd_tbl_t test_commands[] = {
 	U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""),
 	U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""),
+#ifdef CONFIG_DM_TEST
 	U_BOOT_CMD_MKENT(test, 1, 1, do_dm_test, "", ""),
+#endif
 };
 
 static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -128,6 +135,6 @@ U_BOOT_CMD(
 	dm,	2,	1,	do_dm,
 	"Driver model low level access",
 	"tree         Dump driver model tree\n"
-	"dm uclass        Dump list of instances for each uclass\n"
-	"dm test         Run tests"
+	"dm uclass        Dump list of instances for each uclass"
+	TEST_HELP
 );
-- 
2.0.0.526.g5318336

  parent reply	other threads:[~2014-06-10 23:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 23:53 [U-Boot] [PATCH v5 0/15] Collected driver model bug-fixes and docs Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 01/15] Add an I/O tracing feature Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 02/15] arm: Support iotrace feature Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 03/15] sandbox: " Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 04/15] Makefile: Support include files for .dts files Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 05/15] dm: Rename struct device_id to udevice_id Simon Glass
2014-06-11 13:49   ` Jon Loeliger
2014-06-11 16:12     ` Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 06/15] dm: Update README to encourage conversion to driver model Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 07/15] dm: Use case-insensitive comparison for GPIO banks Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 08/15] dm: Add missing header files in lists and root Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 09/15] dm: Cast away the const-ness of the global_data pointer Simon Glass
2014-06-10 23:53 ` Simon Glass [this message]
2014-06-11 14:23   ` [U-Boot] [PATCH v5 10/15] dm: Allow driver model tests only for sandbox Jon Loeliger
2014-06-10 23:53 ` [U-Boot] [PATCH v5 11/15] dm: Fix printf() strings in the 'dm' command Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 12/15] tegra: dts: Bring in GPIO bindings from linux Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 13/15] tegra: Enable driver model Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 14/15] dm: Tidy up four minor code nits Simon Glass
2014-06-10 23:53 ` [U-Boot] [PATCH v5 15/15] dm: Expand and improve the device lifecycle docs Simon Glass
2014-06-11 14:19   ` Jon Loeliger
2014-06-12  2:09     ` Simon Glass
2014-06-11 14:26 ` [U-Boot] [PATCH v5 0/15] Collected driver model bug-fixes and docs Jon Loeliger

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=1402444428-11356-11-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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.