Changeset 1433ecda in mainline for uspace/lib/pcut/src/report/xml.c
- Timestamp:
- 2018-04-04T15:42:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/report/xml.c
r47b2d7e3 r1433ecda 52 52 * @param all_items Start of the list with all items. 53 53 */ 54 static void xml_init(pcut_item_t *all_items) { 54 static void xml_init(pcut_item_t *all_items) 55 { 55 56 int tests_total = pcut_count_tests(all_items); 56 57 test_counter = 0; … … 64 65 * @param suite Suite that just started. 65 66 */ 66 static void xml_suite_start(pcut_item_t *suite) { 67 static void xml_suite_start(pcut_item_t *suite) 68 { 67 69 tests_in_suite = 0; 68 70 failed_tests_in_suite = 0; … … 75 77 * @param suite Suite that just ended. 76 78 */ 77 static void xml_suite_done(pcut_item_t *suite) { 79 static void xml_suite_done(pcut_item_t *suite) 80 { 78 81 printf("\t</suite><!-- %s: %d / %d -->\n", suite->name, 79 82 failed_tests_in_suite, tests_in_suite); 80 83 } 81 84 … … 86 89 * @param test Test that is started. 87 90 */ 88 static void xml_test_start(pcut_item_t *test) { 91 static void xml_test_start(pcut_item_t *test) 92 { 89 93 PCUT_UNUSED(test); 90 94 … … 98 102 * @param element_name Wrapping XML element name. 99 103 */ 100 static void print_by_lines(const char *message, const char *element_name) { 104 static void print_by_lines(const char *message, const char *element_name) 105 { 101 106 char *next_line_start; 102 107 … … 130 135 */ 131 136 static void xml_test_done(pcut_item_t *test, int outcome, 132 const char *error_message, const char *teardown_error_message, 133 const char *extra_output) { 137 const char *error_message, const char *teardown_error_message, 138 const char *extra_output) 139 { 134 140 const char *test_name = test->name; 135 141 const char *status_str = NULL; … … 152 158 153 159 printf("\t\t<testcase name=\"%s\" status=\"%s\">\n", test_name, 154 160 status_str); 155 161 156 162 print_by_lines(error_message, "error-message"); … … 163 169 164 170 /** Report testing done. */ 165 static void xml_done(void) { 171 static void xml_done(void) 172 { 166 173 printf("</report>\n"); 167 174 }
Note:
See TracChangeset
for help on using the changeset viewer.