summaryrefslogtreecommitdiffstats
path: root/include/test
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-20 14:27:36 -0500
committerTom Rini <trini@konsulko.com>2015-05-21 09:16:18 -0400
commit421f86f3293c63fa2669972fb7bdc5ae78729e50 (patch)
tree0a4cf02061c15201325179e5aa8842871ee0a284 /include/test
parentb6227d3993db8f1763a8bd377b189e7b77cfe885 (diff)
downloadblackbird-obmc-uboot-421f86f3293c63fa2669972fb7bdc5ae78729e50.tar.gz
blackbird-obmc-uboot-421f86f3293c63fa2669972fb7bdc5ae78729e50.zip
test: env: Add test framework for env
Add a new "env" subcommand to the ut command. This will run unit tests on the env code. This should be targetable to any device that supports the env features needed for the tests. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/env.h16
-rw-r--r--include/test/suites.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/include/test/env.h b/include/test/env.h
new file mode 100644
index 0000000000..2b0cd682e4
--- /dev/null
+++ b/include/test/env.h
@@ -0,0 +1,16 @@
+/*
+ * (C) Copyright 2015
+ * Joe Hershberger, National Instruments, joe.hershberger@ni.com
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef __TEST_ENV_H__
+#define __TEST_ENV_H__
+
+#include <test/test.h>
+
+/* Declare a new environment test */
+#define ENV_TEST(_name, _flags) UNIT_TEST(_name, _flags, env_test)
+
+#endif /* __TEST_ENV_H__ */
diff --git a/include/test/suites.h b/include/test/suites.h
index f68cdec12a..f5790333ff 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -9,6 +9,7 @@
#define __TEST_SUITES_H__
int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#endif /* __TEST_SUITES_H__ */
OpenPOWER on IntegriCloud