diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-12-24 15:52:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-24 15:52:51 -0500 |
commit | facbd1473fd1914d7c2e702a3de2227bd7b4bfe1 (patch) | |
tree | 8f0881b66984e5a1476ab5f413ab438578510ee5 /src/lib | |
parent | 360cd5b4294dcbec321f8e4b6f84b6c8d63bb4fa (diff) | |
parent | 13f7a7611bb9b7a3e9927ed0438793bb951aad01 (diff) | |
download | stasis-facbd1473fd1914d7c2e702a3de2227bd7b4bfe1.tar.gz |
Merge pull request #80 from jhunkeler/fix-index-junitxml-report
Fix index junitxml report
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/core/include/junitxml.h | 2 | ||||
-rw-r--r-- | src/lib/core/junitxml.c | 1 | ||||
-rw-r--r-- | src/lib/core/utils.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/core/include/junitxml.h b/src/lib/core/include/junitxml.h index 777ee27..a6fca19 100644 --- a/src/lib/core/include/junitxml.h +++ b/src/lib/core/include/junitxml.h @@ -68,6 +68,8 @@ struct JUNIT_Testsuite { int failures; /// Total number of skipped tests int skipped; + /// Total number of successful tests + int passed; /// Total number of tests int tests; /// Total duration in fractional seconds diff --git a/src/lib/core/junitxml.c b/src/lib/core/junitxml.c index 8ab231b..f747224 100644 --- a/src/lib/core/junitxml.c +++ b/src/lib/core/junitxml.c @@ -192,6 +192,7 @@ static int read_xml_data(xmlTextReaderPtr reader, struct JUNIT_Testsuite **tests (*testsuite)->testcase[cur_tc]->result_state.skipped = skipped; } } + (*testsuite)->passed = (*testsuite)->tests - (*testsuite)->failures - (*testsuite)->errors - (*testsuite)->skipped; guard_strlist_free(&attrs); return 0; } diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c index 621831c..a248f58 100644 --- a/src/lib/core/utils.c +++ b/src/lib/core/utils.c @@ -801,6 +801,7 @@ struct StrList *listdir(const char *path) { strlist_append(&node, fullpath); guard_free(fullpath); } + strlist_sort(node, STASIS_SORT_ALPHA); closedir(dp); return node; } |