Go to the source code of this file.
|
#define | PRINT_DATA(fmt, ...) |
|
#define | TC_STR_HELPER(x) |
|
#define | TC_STR(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, ...) |
|
#define | TC_SUMMARY_PRINT(fmt, ...) |
|
#define | TC_START_PRINT(name) |
|
#define | TC_START(name) |
|
#define | TC_END(result, fmt, ...) |
|
#define | TC_END_PRINT(result, fmt, ...) |
|
#define | TC_END_RESULT(result) |
|
#define | TC_END_RESULT_CUSTOM(result, func) |
|
#define | TC_SUITE_PRINT(fmt, ...) |
|
#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) |
|
◆ FMT_ERROR
#define FMT_ERROR "%s - %s@%d. " |
◆ PRINT_DATA
#define PRINT_DATA |
( |
| fmt, |
|
|
| ... ) |
Value:
static void printk(const char *fmt,...)
Print kernel debugging message.
Definition printk.h:51
◆ 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 | ) |
|
◆ TC_END
#define TC_END |
( |
| result, |
|
|
| fmt, |
|
|
| ... ) |
◆ TC_END_POST
#define TC_END_POST |
( |
| result | ) |
|
◆ TC_END_PRINT
#define TC_END_PRINT |
( |
| result, |
|
|
| fmt, |
|
|
| ... ) |
Value:
static void print_nothing(const char *fmt,...)
Definition tc_util.h:124
◆ 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 | ) |
|
Value: Z_TC_END_RESULT((result), __func__)
◆ TC_END_RESULT_CUSTOM
#define TC_END_RESULT_CUSTOM |
( |
| result, |
|
|
| func ) |
Value: 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
#define TC_PRINT |
( |
| fmt, |
|
|
| ... ) |
◆ 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
#define TC_START_PRINT |
( |
| name | ) |
|
◆ TC_STR
Value:
#define TC_STR_HELPER(x)
Definition tc_util.h:47
◆ TC_STR_HELPER
#define TC_STR_HELPER |
( |
| 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, |
|
|
| ... ) |
◆ 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, |
|
|
| ... ) |
◆ 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