testresultlogger.c File Reference

#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <libxml/xmlwriter.h>
#include "testresultlogger.h"
#include "log.h"

Go to the source code of this file.

Functions

LOCAL int xml_write_td_start (td_td *)
LOCAL int xml_write_td_end (td_td *)
LOCAL int xml_write_pre_suite (td_suite *)
LOCAL int xml_write_post_suite (td_suite *)
LOCAL int xml_write_pre_set (td_set *)
LOCAL int xml_write_general_attributes (td_gen_attribs *)
LOCAL int xml_write_step (const void *, const void *)
LOCAL int xml_write_pre_post_step (const void *, const void *)
LOCAL int xml_write_case (const void *, const void *)
LOCAL int xml_write_file_data (const void *, const void *)
LOCAL int xml_write_post_set (td_set *)
LOCAL int txt_write_td_start (td_td *)
LOCAL int txt_write_td_end (td_td *)
LOCAL int txt_write_pre_suite (td_suite *)
LOCAL int txt_write_post_suite (td_suite *)
LOCAL int txt_write_pre_set (td_set *)
LOCAL int txt_write_post_set (td_set *)
LOCAL int txt_write_case (const void *, const void *)
LOCAL int txt_write_step (const void *data, const void *user)
int init_result_logger (testrunner_lite_options *opts, hw_info *hwinfo)
int write_td_start (td_td *td)
int write_td_end (td_td *td)
int write_pre_suite (td_suite *suite)
int write_post_suite (td_suite *suite)
int write_pre_set (td_set *set)
int write_post_set (td_set *set)
int xml_end_element ()
void close_result_logger (void)

Variables

LOCAL xmlTextWriterPtr writer
LOCAL FILE * ofile
struct {
   int(*   write_td_start )(td_td *)
   int(*   write_td_end )(td_td *)
   int(*   write_pre_suite )(td_suite *)
   int(*   write_post_suite )(td_suite *)
   int(*   write_pre_set )(td_set *)
   int(*   write_post_set )(td_set *)
out_cbs

Function Documentation

void close_result_logger ( void   ) 

Close the result logger

Definition at line 1049 of file testresultlogger.c.

int init_result_logger ( testrunner_lite_options opts,
hw_info hwinfo 
)

Initialize result logger according to user options.

Parameters:
opts commandline options
hwinfo hardware information
Returns:
0 on success

Definition at line 864 of file testresultlogger.c.

LOCAL int txt_write_case ( const void *  data,
const void *  user 
)

Write case result to text file

Parameters:
data case data
user not used
Returns:
1 on success, 0 on error

Definition at line 723 of file testresultlogger.c.

LOCAL int txt_write_post_set ( td_set set  ) 

Write post set information to text file - loop through test cases

Parameters:
set set data
Returns:
0 on always

Definition at line 848 of file testresultlogger.c.

LOCAL int txt_write_post_suite ( td_suite suite  ) 

Write post suite to text file - does not do anything at the moment

Returns:
0 on always

Definition at line 815 of file testresultlogger.c.

LOCAL int txt_write_pre_set ( td_set set  ) 

Write pre set information to text file

Parameters:
set set data
Returns:
0 on always

Definition at line 825 of file testresultlogger.c.

LOCAL int txt_write_pre_suite ( td_suite suite  ) 

Write suite start txt tag

Parameters:
suite suite data
Returns:
0 on success, 1 on error

Definition at line 796 of file testresultlogger.c.

LOCAL int txt_write_step ( const void *  data,
const void *  user 
)

Write step result to text file

Parameters:
data step data
user not used
Returns:
1 on success, 0 on error

Definition at line 678 of file testresultlogger.c.

LOCAL int txt_write_td_end ( td_td td  ) 

Write the test definition attributes to xml results

Parameters:
td test definition data
Returns:
0 on success, 1 on error

Definition at line 783 of file testresultlogger.c.

LOCAL int txt_write_td_start ( td_td td  ) 

Write the test definition attributes to xml results

Parameters:
td test definition data
Returns:
0 on success, 1 on error

Definition at line 773 of file testresultlogger.c.

int write_post_set ( td_set set  ) 

Call post_set callback

Parameters:
set set data
Returns:
0 on success

Definition at line 1028 of file testresultlogger.c.

int write_post_suite ( td_suite suite  ) 

Call post_suite callback

Parameters:
suite suite data
Returns:
0 on success

Definition at line 1009 of file testresultlogger.c.

int write_pre_set ( td_set set  ) 

Call pre_set callback

Parameters:
set set data
Returns:
0 on success

Definition at line 1019 of file testresultlogger.c.

int write_pre_suite ( td_suite suite  ) 

Call pre_suite callback

Parameters:
suite suite data
Returns:
0 on success

Definition at line 1000 of file testresultlogger.c.

int write_td_end ( td_td td  ) 

Call td_end callback

Parameters:
td td data
Returns:
0 on success

Definition at line 991 of file testresultlogger.c.

int write_td_start ( td_td td  ) 

Call td_start callback

Parameters:
td td data
Returns:
0 on success

Definition at line 982 of file testresultlogger.c.

int xml_end_element ( void   ) 

Write end element tag

Returns:
0 on success, 1 on error.

Definition at line 1037 of file testresultlogger.c.

LOCAL int xml_write_case ( const void *  data,
const void *  user 
)

Write case result xml

Parameters:
data case data
user not used
Returns:
1 on success, 0 on error

Definition at line 520 of file testresultlogger.c.

LOCAL int xml_write_file_data ( const void *  data,
const void *  user 
)

Write get/file data to results

Parameters:
data td_dile
user not used
Returns:
1 on success, 0 on error

Definition at line 588 of file testresultlogger.c.

LOCAL int xml_write_general_attributes ( td_gen_attribs gen  ) 

Write the values of general attributes

Parameters:
gen 
Returns:
0 on success, 1 on error

Definition at line 231 of file testresultlogger.c.

LOCAL int xml_write_post_set ( td_set set  ) 

Write set start tag and cases result xml

Parameters:
set set data
Returns:
0 on success, 1 on error

Definition at line 610 of file testresultlogger.c.

LOCAL int xml_write_post_suite ( td_suite suite  ) 

Write suite end

Parameters:
suite suite data
Returns:
0 on success, 1 on error

Definition at line 191 of file testresultlogger.c.

LOCAL int xml_write_pre_post_step ( const void *  data,
const void *  user 
)

Write pre or post step result xml

Parameters:
data step data
user not used
Returns:
1 on success, 0 on error if the step is failed

Definition at line 423 of file testresultlogger.c.

LOCAL int xml_write_pre_set ( td_set set  ) 

Write pre-set xml tag

Parameters:
set set data
Returns:
0 on success, 1 on error

Definition at line 208 of file testresultlogger.c.

LOCAL int xml_write_pre_suite ( td_suite suite  ) 

Write suite start xml tag

Parameters:
suite suite data
Returns:
0 on success, 1 on error

Definition at line 172 of file testresultlogger.c.

LOCAL int xml_write_step ( const void *  data,
const void *  user 
)

Write step result xml

Parameters:
data step data
user not used
Returns:
1 on success, 0 on error if the step is failed

Definition at line 320 of file testresultlogger.c.

LOCAL int xml_write_td_end ( td_td td  ) 

Write the test definition top level elements

Parameters:
td test definition data
Returns:
0 on success, 1 on error

Definition at line 146 of file testresultlogger.c.

LOCAL int xml_write_td_start ( td_td td  ) 

Write the test definition attributes to xml results

Parameters:
td test definition data
Returns:
0 on success, 1 on error

Definition at line 129 of file testresultlogger.c.


Variable Documentation

LOCAL FILE* ofile

Definition at line 61 of file testresultlogger.c.

struct { ... } out_cbs
int(* write_post_set)(td_set *)

Definition at line 75 of file testresultlogger.c.

int(* write_post_suite)(td_suite *)

Definition at line 73 of file testresultlogger.c.

int(* write_pre_set)(td_set *)

Definition at line 74 of file testresultlogger.c.

int(* write_pre_suite)(td_suite *)

Definition at line 72 of file testresultlogger.c.

int(* write_td_end)(td_td *)

Definition at line 71 of file testresultlogger.c.

int(* write_td_start)(td_td *)

Definition at line 70 of file testresultlogger.c.

LOCAL xmlTextWriterPtr writer

Definition at line 60 of file testresultlogger.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Thu Jan 27 07:39:35 2011 for testrunner-lite by  doxygen 1.6.3