diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-05-16 12:13:35 -0400 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-05-16 12:17:46 -0400 | 
| commit | eaaae2c0f77fe371b1da8c2c248888103d488961 (patch) | |
| tree | 1137d0e51c214fb9aec6f321c40250a49c6fdba9 /include | |
| parent | 9ad649be44c568a00f2f407d715d07cd585c2b25 (diff) | |
| download | stasis-eaaae2c0f77fe371b1da8c2c248888103d488961.tar.gz | |
First pass at test result creation, and optional markdown->html conversion
Diffstat (limited to 'include')
| -rw-r--r-- | include/junitxml.h | 47 | ||||
| -rw-r--r-- | include/omc.h | 1 | 
2 files changed, 48 insertions, 0 deletions
| diff --git a/include/junitxml.h b/include/junitxml.h new file mode 100644 index 0000000..d5e7708 --- /dev/null +++ b/include/junitxml.h @@ -0,0 +1,47 @@ +// @file junitxml.h +#ifndef OMC_JUNITXML_H +#define OMC_JUNITXML_H +#include <libxml/xmlreader.h> + +struct JUNIT_Failure { +    char *message; +}; + +struct JUNIT_Skipped { +    char *type; +    char *message; +}; + +#define JUNIT_RESULT_STATE_NONE 0 +#define JUNIT_RESULT_STATE_FAILURE 1 +#define JUNIT_RESULT_STATE_SKIPPED 2 +struct JUNIT_Testcase { +    char *classname; +    char *name; +    float time; +    char *message; +    int tc_result_state_type; +    union tc_state_ptr { +        struct JUNIT_Failure *failure; +        struct JUNIT_Skipped *skipped; +    } result_state; +}; + +struct JUNIT_Testsuite { +    char *name; +    int errors; +    int failures; +    int skipped; +    int tests; +    float time; +    char *timestamp; +    char *hostname; +    struct JUNIT_Testcase **testcase; +    size_t _tc_inuse; +    size_t _tc_alloc; +}; + +struct JUNIT_Testsuite *junitxml_testsuite_read(const char *filename); +void junitxml_testsuite_free(struct JUNIT_Testsuite **testsuite); + +#endif //OMC_JUNITXML_H diff --git a/include/omc.h b/include/omc.h index 45f5671..a116296 100644 --- a/include/omc.h +++ b/include/omc.h @@ -38,6 +38,7 @@  #include "recipe.h"  #include "relocation.h"  #include "wheel.h" +#include "junitxml.h"  #define guard_runtime_free(X) do { if (X) { runtime_free(X); X = NULL; } } while (0)  #define guard_strlist_free(X) do { if ((*X)) { strlist_free(X); (*X) = NULL; } } while (0) | 
