mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
4d869c1e49
The logic to either iterate through a list of tests or pick a named test is common to at lest two test suits. Move this logic into a new function and call it from the environment tests. Signed-off-by: Simon Glass <sjg@chromium.org>
20 lines
524 B
C
20 lines
524 B
C
/*
|
|
* (C) Copyright 2015
|
|
* Joe Hershberger, National Instruments, joe.hershberger@ni.com
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <command.h>
|
|
#include <test/env.h>
|
|
#include <test/suites.h>
|
|
#include <test/ut.h>
|
|
|
|
int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|
{
|
|
struct unit_test *tests = ll_entry_start(struct unit_test, env_test);
|
|
const int n_ents = ll_entry_count(struct unit_test, env_test);
|
|
|
|
return cmd_ut_category("environment", tests, n_ents, argc, argv);
|
|
}
|