xref: /linux/tools/testing/selftests/powerpc/include/subunit.h (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1f50a7f3dSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
215ec3997SSimon Guo /*
315ec3997SSimon Guo  * Copyright 2013, Michael Ellerman, IBM Corp.
415ec3997SSimon Guo  */
515ec3997SSimon Guo 
615ec3997SSimon Guo #ifndef _SELFTESTS_POWERPC_SUBUNIT_H
715ec3997SSimon Guo #define _SELFTESTS_POWERPC_SUBUNIT_H
815ec3997SSimon Guo 
test_start(const char * name)9*701ca365SNathan Lynch static inline void test_start(const char *name)
1015ec3997SSimon Guo {
1115ec3997SSimon Guo 	printf("test: %s\n", name);
1215ec3997SSimon Guo }
1315ec3997SSimon Guo 
test_failure_detail(const char * name,const char * detail)14*701ca365SNathan Lynch static inline void test_failure_detail(const char *name, const char *detail)
1515ec3997SSimon Guo {
1615ec3997SSimon Guo 	printf("failure: %s [%s]\n", name, detail);
1715ec3997SSimon Guo }
1815ec3997SSimon Guo 
test_failure(const char * name)19*701ca365SNathan Lynch static inline void test_failure(const char *name)
2015ec3997SSimon Guo {
2115ec3997SSimon Guo 	printf("failure: %s\n", name);
2215ec3997SSimon Guo }
2315ec3997SSimon Guo 
test_error(const char * name)24*701ca365SNathan Lynch static inline void test_error(const char *name)
2515ec3997SSimon Guo {
2615ec3997SSimon Guo 	printf("error: %s\n", name);
2715ec3997SSimon Guo }
2815ec3997SSimon Guo 
test_skip(const char * name)29*701ca365SNathan Lynch static inline void test_skip(const char *name)
3015ec3997SSimon Guo {
3115ec3997SSimon Guo 	printf("skip: %s\n", name);
3215ec3997SSimon Guo }
3315ec3997SSimon Guo 
test_success(const char * name)34*701ca365SNathan Lynch static inline void test_success(const char *name)
3515ec3997SSimon Guo {
3615ec3997SSimon Guo 	printf("success: %s\n", name);
3715ec3997SSimon Guo }
3815ec3997SSimon Guo 
test_finish(const char * name,int status)39*701ca365SNathan Lynch static inline void test_finish(const char *name, int status)
4015ec3997SSimon Guo {
4115ec3997SSimon Guo 	if (status)
4215ec3997SSimon Guo 		test_failure(name);
4315ec3997SSimon Guo 	else
4415ec3997SSimon Guo 		test_success(name);
4515ec3997SSimon Guo }
4615ec3997SSimon Guo 
test_set_git_version(const char * value)47*701ca365SNathan Lynch static inline void test_set_git_version(const char *value)
4815ec3997SSimon Guo {
4915ec3997SSimon Guo 	printf("tags: git_version:%s\n", value);
5015ec3997SSimon Guo }
5115ec3997SSimon Guo 
5215ec3997SSimon Guo #endif /* _SELFTESTS_POWERPC_SUBUNIT_H */
53