xref: /linux/tools/testing/selftests/powerpc/include/subunit.h (revision a23e1966932464e1c5226cb9ac4ce1d5fc10ba22)
1f50a7f3dSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
22fae0d7cSMichael Ellerman /*
32fae0d7cSMichael Ellerman  * Copyright 2013, Michael Ellerman, IBM Corp.
42fae0d7cSMichael Ellerman  */
52fae0d7cSMichael Ellerman 
62fae0d7cSMichael Ellerman #ifndef _SELFTESTS_POWERPC_SUBUNIT_H
72fae0d7cSMichael Ellerman #define _SELFTESTS_POWERPC_SUBUNIT_H
82fae0d7cSMichael Ellerman 
test_start(const char * name)9*701ca365SNathan Lynch static inline void test_start(const char *name)
102fae0d7cSMichael Ellerman {
112fae0d7cSMichael Ellerman 	printf("test: %s\n", name);
122fae0d7cSMichael Ellerman }
132fae0d7cSMichael Ellerman 
test_failure_detail(const char * name,const char * detail)14*701ca365SNathan Lynch static inline void test_failure_detail(const char *name, const char *detail)
152fae0d7cSMichael Ellerman {
162fae0d7cSMichael Ellerman 	printf("failure: %s [%s]\n", name, detail);
172fae0d7cSMichael Ellerman }
182fae0d7cSMichael Ellerman 
test_failure(const char * name)19*701ca365SNathan Lynch static inline void test_failure(const char *name)
202fae0d7cSMichael Ellerman {
212fae0d7cSMichael Ellerman 	printf("failure: %s\n", name);
222fae0d7cSMichael Ellerman }
232fae0d7cSMichael Ellerman 
test_error(const char * name)24*701ca365SNathan Lynch static inline void test_error(const char *name)
252fae0d7cSMichael Ellerman {
262fae0d7cSMichael Ellerman 	printf("error: %s\n", name);
272fae0d7cSMichael Ellerman }
282fae0d7cSMichael Ellerman 
test_skip(const char * name)29*701ca365SNathan Lynch static inline void test_skip(const char *name)
3033b4819fSMichael Ellerman {
3133b4819fSMichael Ellerman 	printf("skip: %s\n", name);
3233b4819fSMichael Ellerman }
3333b4819fSMichael Ellerman 
test_success(const char * name)34*701ca365SNathan Lynch static inline void test_success(const char *name)
352fae0d7cSMichael Ellerman {
362fae0d7cSMichael Ellerman 	printf("success: %s\n", name);
372fae0d7cSMichael Ellerman }
382fae0d7cSMichael Ellerman 
test_finish(const char * name,int status)39*701ca365SNathan Lynch static inline void test_finish(const char *name, int status)
402fae0d7cSMichael Ellerman {
412fae0d7cSMichael Ellerman 	if (status)
422fae0d7cSMichael Ellerman 		test_failure(name);
432fae0d7cSMichael Ellerman 	else
442fae0d7cSMichael Ellerman 		test_success(name);
452fae0d7cSMichael Ellerman }
462fae0d7cSMichael Ellerman 
test_set_git_version(const char * value)47*701ca365SNathan Lynch static inline void test_set_git_version(const char *value)
482fae0d7cSMichael Ellerman {
492fae0d7cSMichael Ellerman 	printf("tags: git_version:%s\n", value);
502fae0d7cSMichael Ellerman }
512fae0d7cSMichael Ellerman 
522fae0d7cSMichael Ellerman #endif /* _SELFTESTS_POWERPC_SUBUNIT_H */
53