diff options
author | Simon Glass <sjg@chromium.org> | 2017-11-25 11:57:33 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-12-04 09:58:20 -0500 |
commit | 0aac10f2f9e59bb0e717de25a2e717f3d387ea60 (patch) | |
tree | 3c47d0a2dc23cf15d186c3d866e9f4a3f1a4ca0f /include/test | |
parent | 1f0fe88db11ebf99f860504bf4132fb97740504c (diff) | |
download | u-boot-0aac10f2f9e59bb0e717de25a2e717f3d387ea60.tar.gz u-boot-0aac10f2f9e59bb0e717de25a2e717f3d387ea60.tar.bz2 u-boot-0aac10f2f9e59bb0e717de25a2e717f3d387ea60.zip |
test: compression: Convert to unit test framework
Adjust this test to use the unit test framework. Drop the two existing
commands for running the tests and replace them with a single
'ut compression' command, with sub-commands.
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Continue to have ret = run_test_internal(...) in run_test so ret
is always initialized]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/compression.h | 17 | ||||
-rw-r--r-- | include/test/suites.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/test/compression.h b/include/test/compression.h new file mode 100644 index 0000000000..646f117ed8 --- /dev/null +++ b/include/test/compression.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2017 Google, Inc + * Written by Simon Glass <sjg@chromium.org> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __TEST_COMPRESSION_H__ +#define __TEST_COMPRESSION_H__ + +#include <test/test.h> + +/* Declare a new compression test */ +#define COMPRESSION_TEST(_name, _flags) \ + UNIT_TEST(_name, _flags, compression_test) + +#endif /* __TEST_ENV_H__ */ diff --git a/include/test/suites.h b/include/test/suites.h index 6b900a8f59..5f2e519084 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -28,5 +28,6 @@ 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_overlay(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[]); +int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); #endif /* __TEST_SUITES_H__ */ |