Go to the source code of this file.
|
#define | PRINT_DATA(fmt, ...) printk(fmt, ##__VA_ARGS__) |
|
#define | TC_STR_HELPER(x) #x |
|
#define | TC_STR(x) TC_STR_HELPER(x) |
|
#define | TC_PRINT_RUNID do {} while (false) |
| Report a Run ID.
|
|
#define | PRINT_LINE |
|
#define | TASK_STACK_SIZE (1024 * 2) |
|
#define | FMT_ERROR "%s - %s@%d. " |
|
#define | TC_PASS 0 |
|
#define | TC_FAIL 1 |
|
#define | TC_SKIP 2 |
|
#define | TC_FLAKY 3 |
|
#define | TC_PASS_STR "PASS" |
|
#define | TC_FAIL_STR "FAIL" |
|
#define | TC_SKIP_STR "SKIP" |
|
#define | TC_FLAKY_STR "FLAKY" |
|
#define | TC_ERROR(fmt, ...) |
|
#define | TC_PRINT(fmt, ...) print_nothing(fmt, ##__VA_ARGS__) |
|
#define | TC_SUMMARY_PRINT(fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) |
|
#define | TC_START_PRINT(name) print_nothing(name) |
|
#define | TC_START(name) |
|
#define | TC_END(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) |
|
#define | TC_END_PRINT(result, fmt, ...) print_nothing(fmt) |
|
#define | TC_END_RESULT(result) Z_TC_END_RESULT((result), __func__) |
|
#define | TC_END_RESULT_CUSTOM(result, func) Z_TC_END_RESULT((result), func) |
|
#define | TC_SUITE_PRINT(fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) |
|
#define | TC_SUITE_START(name) |
|
#define | TC_SUITE_END(name, result) |
|
#define | TC_END_POST(result) |
|
#define | TC_END_REPORT(result) |
|
#define | TC_CMD_DEFINE(name) |
|
#define | TC_CMD_ITEM(name) {STRINGIFY(name), cmd_##name, "none"} |
|
◆ FMT_ERROR
#define FMT_ERROR "%s - %s@%d. " |
◆ PRINT_DATA
#define PRINT_DATA |
( |
|
fmt, |
|
|
|
... |
|
) |
| printk(fmt, ##__VA_ARGS__) |
◆ PRINT_LINE
Value:
"============================================================" \
"=======\n")
#define PRINT_DATA(fmt,...)
Definition: tc_util.h:25
◆ TASK_STACK_SIZE
#define TASK_STACK_SIZE (1024 * 2) |
◆ TC_CMD_DEFINE
#define TC_CMD_DEFINE |
( |
|
name | ) |
|
Value: int cmd_##name(int argc, char *argv[]) \
{ \
TC_START(__func__); \
name(); \
return 0; \
}
#define TC_PASS
Definition: tc_util.h:67
◆ TC_CMD_ITEM
#define TC_CMD_ITEM |
( |
|
name | ) |
{STRINGIFY(name), cmd_##name, "none"} |
◆ TC_END
#define TC_END |
( |
|
result, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| PRINT_DATA(fmt, ##__VA_ARGS__) |
◆ TC_END_POST
#define TC_END_POST |
( |
|
result | ) |
|
◆ TC_END_PRINT
◆ TC_END_REPORT
#define TC_END_REPORT |
( |
|
result | ) |
|
Value: do { \
TC_END(result, \
"PROJECT EXECUTION %s\n", \
(result) ==
TC_PASS ?
"SUCCESSFUL" :
"FAILED"); \
TC_END_POST(result); \
} while (false)
#define TC_PRINT_RUNID
Report a Run ID.
Definition: tc_util.h:52
#define PRINT_LINE
Definition: tc_util.h:56
◆ TC_END_RESULT
#define TC_END_RESULT |
( |
|
result | ) |
Z_TC_END_RESULT((result), __func__) |
◆ TC_END_RESULT_CUSTOM
#define TC_END_RESULT_CUSTOM |
( |
|
result, |
|
|
|
func |
|
) |
| Z_TC_END_RESULT((result), func) |
◆ TC_ERROR
#define TC_ERROR |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
Value: do { \
PRINT_DATA(
FMT_ERROR,
"FAIL", __func__, __LINE__); \
PRINT_DATA(fmt, ##__VA_ARGS__); \
} while (false)
#define FMT_ERROR
Definition: tc_util.h:65
◆ TC_FAIL
◆ TC_FAIL_STR
#define TC_FAIL_STR "FAIL" |
◆ TC_FLAKY
◆ TC_FLAKY_STR
#define TC_FLAKY_STR "FLAKY" |
◆ TC_PASS
◆ TC_PASS_STR
#define TC_PASS_STR "PASS" |
◆ TC_PRINT
◆ TC_PRINT_RUNID
#define TC_PRINT_RUNID do {} while (false) |
Report a Run ID.
When the CPP symbol TC_RUNID
is defined (for example, from the compile environment), print the defined string RunID: <TC_RUNID>
when called (TC_END_REPORT() will also call it).
This is used mainly when automating the execution and running of multiple test cases, to verify that the expected image is being executed (as sometimes the targets fail to flash or reset properly).
TC_RUNID is any string, that will be converted to a string literal.
◆ TC_SKIP
◆ TC_SKIP_STR
#define TC_SKIP_STR "SKIP" |
◆ TC_START
Value: do { \
TC_START_PRINT(name); \
} while (0)
◆ TC_START_PRINT
◆ TC_STR
◆ TC_STR_HELPER
#define TC_STR_HELPER |
( |
|
x | ) |
#x |
◆ TC_SUITE_END
#define TC_SUITE_END |
( |
|
name, |
|
|
|
result |
|
) |
| |
Value: do { \
TC_SUITE_PRINT("TESTSUITE %s succeeded\n", name); \
} else { \
TC_SUITE_PRINT("TESTSUITE %s failed.\n", name); \
} \
} while (false)
#define TC_FAIL
Definition: tc_util.h:68
◆ TC_SUITE_PRINT
#define TC_SUITE_PRINT |
( |
|
fmt, |
|
|
|
... |
|
) |
| PRINT_DATA(fmt, ##__VA_ARGS__) |
◆ TC_SUITE_START
#define TC_SUITE_START |
( |
|
name | ) |
|
Value: do { \
TC_SUITE_PRINT("Running TESTSUITE %s\n", name); \
} while (false)
◆ TC_SUMMARY_PRINT
#define TC_SUMMARY_PRINT |
( |
|
fmt, |
|
|
|
... |
|
) |
| PRINT_DATA(fmt, ##__VA_ARGS__) |
◆ get_start_time_cyc()
static void get_start_time_cyc |
( |
void |
| ) |
|
|
inlinestatic |
◆ get_test_duration_ms()
static void get_test_duration_ms |
( |
void |
| ) |
|
|
inlinestatic |
◆ print_nothing()
static void print_nothing |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
inlinestatic |
◆ TC_RESULT_TO_STR()
static const char * TC_RESULT_TO_STR |
( |
int |
result | ) |
|
|
inlinestatic |
◆ tc_spend_time
◆ tc_start_time