From 421f86f3293c63fa2669972fb7bdc5ae78729e50 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 20 May 2015 14:27:36 -0500 Subject: 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 Reviewed-by: Simon Glass --- include/test/env.h | 16 ++++++++++++++++ include/test/suites.h | 1 + 2 files changed, 17 insertions(+) create mode 100644 include/test/env.h (limited to 'include/test') diff --git a/include/test/env.h b/include/test/env.h new file mode 100644 index 0000000..2b0cd68 --- /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 + +/* 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 f68cdec..f579033 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__ */ -- cgit v1.1