diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-22 10:05:25 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-22 10:05:25 -0500 |
commit | e1c7ff58e865d31f2c7c60faf94eb2aaa27d0416 (patch) | |
tree | 1f45c967a4412766ad3c5c8ff04801618a4cc466 | |
parent | 360cd5b4294dcbec321f8e4b6f84b6c8d63bb4fa (diff) | |
download | stasis-e1c7ff58e865d31f2c7c60faf94eb2aaa27d0416.tar.gz |
junitxml: expose number of tests that passed
-rw-r--r-- | src/lib/core/include/junitxml.h | 2 | ||||
-rw-r--r-- | src/lib/core/junitxml.c | 1 |
2 files changed, 3 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; } |