summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/start.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-25 20:38:33 -0600
committerSimon Glass <sjg@chromium.org>2020-10-29 14:42:18 -0600
commit22b29cc8fb15f611e8e2af6fde8627a32abea76d (patch)
treec04b463c63901c50087822c6d29a329fd1a9ca7a /arch/sandbox/cpu/start.c
parent7b51bf770af349aa03f49cb9f445173ff2dc7fc7 (diff)
sandbox: Allow selection of SPL unit tests
Now that we have more than one test, add a way to select the test to run. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r--arch/sandbox/cpu/start.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index f5e104b127..569dafbcfe 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -383,6 +383,15 @@ static int sandbox_cmdline_cb_unittests(struct sandbox_state *state,
}
SANDBOX_CMDLINE_OPT_SHORT(unittests, 'u', 0, "Run unit tests");
+static int sandbox_cmdline_cb_select_unittests(struct sandbox_state *state,
+ const char *arg)
+{
+ state->select_unittests = arg;
+
+ return 0;
+}
+SANDBOX_CMDLINE_OPT_SHORT(select_unittests, 'k', 1, "Select unit tests to run");
+
static void setup_ram_buf(struct sandbox_state *state)
{
/* Zero the RAM buffer if we didn't read it, to keep valgrind happy */