Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Joe Hershberger | c617ede | 2015-05-20 14:27:28 -0500 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 |
| 4 | * Joe Hershberger, National Instruments, joe.hershberger@ni.com |
Joe Hershberger | c617ede | 2015-05-20 14:27:28 -0500 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __TEST_SUITES_H__ |
| 8 | #define __TEST_SUITES_H__ |
| 9 | |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 10 | struct cmd_tbl; |
Simon Glass | 4d869c1 | 2017-11-25 11:57:29 -0700 | [diff] [blame] | 11 | struct unit_test; |
| 12 | |
| 13 | /** |
| 14 | * cmd_ut_category() - Run a category of unit tests |
| 15 | * |
| 16 | * @name: Category name |
Philippe Reynes | 4ad4edf | 2019-12-17 19:07:04 +0100 | [diff] [blame] | 17 | * @prefix: Prefix of test name |
Simon Glass | 4d869c1 | 2017-11-25 11:57:29 -0700 | [diff] [blame] | 18 | * @tests: List of tests to run |
| 19 | * @n_ents: Number of tests in @tests |
Heinrich Schuchardt | 4b0a2d3 | 2018-08-27 22:04:10 +0200 | [diff] [blame] | 20 | * @argc: Argument count provided. Must be >= 1. If this is 1 then all |
Simon Glass | 4d869c1 | 2017-11-25 11:57:29 -0700 | [diff] [blame] | 21 | * tests are run, otherwise only the one named @argv[1] is run. |
| 22 | * @argv: Arguments: argv[1] is the test to run (if @argc >= 2) |
| 23 | * @return 0 if OK, CMD_RET_FAILURE on failure |
| 24 | */ |
Philippe Reynes | 4ad4edf | 2019-12-17 19:07:04 +0100 | [diff] [blame] | 25 | int cmd_ut_category(const char *name, const char *prefix, |
| 26 | struct unit_test *tests, int n_ents, |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 27 | int argc, char *const argv[]); |
Simon Glass | 4d869c1 | 2017-11-25 11:57:29 -0700 | [diff] [blame] | 28 | |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 29 | int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc, |
| 30 | char *const argv[]); |
| 31 | int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, |
| 32 | char *const argv[]); |
| 33 | int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 34 | int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 35 | int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 36 | int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); |
Simon Glass | 550a9e7 | 2020-07-28 19:41:14 -0600 | [diff] [blame] | 37 | int do_ut_mem(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 38 | int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 39 | int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, |
| 40 | char *const argv[]); |
Simon Glass | 90a9901 | 2020-11-01 14:15:35 -0700 | [diff] [blame^] | 41 | int do_ut_setexpr(struct cmd_tbl *cmdtp, int flag, int argc, |
| 42 | char *const argv[]); |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 43 | int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 44 | int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 45 | int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc, |
| 46 | char *const argv[]); |
Joe Hershberger | 40441e0 | 2015-05-20 14:27:29 -0500 | [diff] [blame] | 47 | |
Joe Hershberger | c617ede | 2015-05-20 14:27:28 -0500 | [diff] [blame] | 48 | #endif /* __TEST_SUITES_H__ */ |