mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 14:00:19 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			21 lines
		
	
	
		
			524 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			21 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);
 | 
						|
}
 |