@@ -60,7 +60,11 @@ static void greentea_notify_completion(const int);
60
60
static void greentea_notify_version ();
61
61
static void greentea_write_string (const char *str);
62
62
63
-
63
+ /* * \brief Handle the handshake with the host
64
+ * \details This is contains the shared handhshake functionality that is used between
65
+ * GREENTEA_SETUP and GREENTEA_SETUP_UUID.
66
+ * This function is blocking.
67
+ */
64
68
void _GREENTEA_SETUP_COMMON (const int timeout, const char *host_test_name, char *buffer, size_t size) {
65
69
greentea_metrics_setup ();
66
70
// Key-value protocol handshake function. Waits for {{__sync;...}} message
@@ -73,7 +77,7 @@ void _GREENTEA_SETUP_COMMON(const int timeout, const char *host_test_name, char
73
77
greentea_parse_kv (_key, buffer, sizeof (_key), size);
74
78
greentea_write_string (" mbedmbedmbedmbedmbedmbedmbedmbed\r\n " );
75
79
if (strcmp (_key, GREENTEA_TEST_ENV_SYNC) == 0 ) {
76
- // Found correct __sunc message
80
+ // Found correct __sync message
77
81
greentea_send_kv (_key, buffer);
78
82
break ;
79
83
}
@@ -95,11 +99,13 @@ void GREENTEA_SETUP(const int timeout, const char *host_test_name) {
95
99
_GREENTEA_SETUP_COMMON (timeout, host_test_name, _value, GREENTEA_UUID_LENGTH);
96
100
}
97
101
98
- /* * \brief Handshake with host and send setup data (timeout and host test name)
102
+ /* * \brief Handshake with host and send setup data (timeout and host test name). Allows you to preserve sync UUID.
99
103
* \details This function will send preamble to master.
100
104
* After host test name is received master will invoke host test script
101
105
* and add hos test's callback handlers to main event loop
102
106
* This function is blocking.
107
+ * This function differs from GREENTEA_SETUP because it allows you to
108
+ * preserve the UUID sent during the sync process.
103
109
*/
104
110
void GREENTEA_SETUP_UUID (const int timeout, const char *host_test_name, char *buffer, size_t size) {
105
111
_GREENTEA_SETUP_COMMON (timeout, host_test_name, buffer, size);
0 commit comments