28#define DIR_SEPARATOR_CHAR '/'
29#define DIR_SEPARATOR_STRING "/"
31#define DIR_SEPARATOR_CHAR '\\'
32#define DIR_SEPARATOR_STRING "\\"
58 newpath =
strdup(origpath);
61 while (newpath[
i] != 0)
64 if (newpath[
i] ==
'\\')
70 if (newpath[
i] ==
'/')
115 printf(
"Out of memory\n");
200 static char test_marker[] =
"ROSREGTEST:";
290 if (test_result_info ==
NULL)
292 printf(
"Out of memory\n");
349 while (test_result_info !=
NULL)
359 test_result_info = test_result_info->
next;
362 if (succeeded_total + failed_total > 0)
364 success_rate = ((succeeded_total) * 100) / (succeeded_total + failed_total);
371 write_line(
"<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>");
374 sprintf(
buf,
"<testresults success_rate=\"%d\" succeeded_total=\"%d\" failed_total=\"%d\">",
375 success_rate, succeeded_total, failed_total);
381 while (test_result_info !=
NULL)
383 sprintf(
buf,
"<testresult testname=\"%s\" succeeded=\"%s\" result=\"%s\">",
385 test_result_info->
succeeded == 1 ?
"true" :
"false",
386 test_result_info->
result);
389 test_result_info = test_result_info->
next;
397 "REGTESTS2XML input-filename output-filename\n"
399 " input-filename File containing output from running regression tests\n"
400 " output-filename File to create\n";
414 if (input_file[0] == 0)
417 printf(
"Missing input-filename\n");
422 if (output_file[0] == 0)
426 printf(
"Missing output-filename\n");
435 printf(
"Cannot open output file");
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
int puts(const char *string)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
#define sprintf(buf, format,...)
static int read_until_end(char *buf)
static unsigned int file_size
static void parse_file(char *filename)
static void generate_xml()
static int is_eol_char(char ch)
static int read_until(char ch, char *buf)
struct _TEST_RESULT_INFO TEST_RESULT_INFO
static void skip_whitespace()
static PTEST_RESULT_INFO test_result_info_list
static int skip_to_next_test()
static FILE * file_handle
static void write_line(char *line)
static int is_whitespace(char ch)
struct _TEST_RESULT_INFO * PTEST_RESULT_INFO
static char * convert_path(char *origpath)
static char * file_buffer
static void read_file(char *filename)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
struct _TEST_RESULT_INFO * next