#include <stdio.h>#include <stdlib.h>#include <getopt.h>#include <errno.h>#include <string.h>#include <libxml/xmlreader.h>#include <libxml/xmlschemas.h>#include "testrunnerlite.h"#include "testdefinitiondatatypes.h"#include "testdefinitionparser.h"#include "log.h"Go to the source code of this file.
Functions | |
| LOCAL int | td_parse_gen_attribs (td_gen_attribs *, td_gen_attribs *) |
| LOCAL int | td_parse_suite (void) |
| LOCAL int | td_parse_steps (xmlListPtr, const char *) |
| LOCAL td_step * | td_parse_step (void) |
| LOCAL int | td_parse_case (td_set *s) |
| LOCAL int | td_parse_environments (xmlListPtr) |
| LOCAL int | td_parse_gets (xmlListPtr) |
| LOCAL int | td_parse_set () |
| int | parse_test_definition (testrunner_lite_options *opts) |
| int | td_reader_init (testrunner_lite_options *opts) |
| void | td_reader_close () |
| int | td_next_node (void) |
| int | td_register_callbacks (td_parser_callbacks *pcbs) |
Variables | |
| LOCAL td_parser_callbacks * | cbs |
| LOCAL xmlTextReaderPtr | reader |
| LOCAL xmlSchemaParserCtxtPtr | schema_context = NULL |
| LOCAL xmlSchemaPtr | schema = NULL |
| LOCAL td_suite * | current_suite |
| int parse_test_definition | ( | testrunner_lite_options * | opts | ) |
parse testdefinition xml file and validate it agains testdefinition schema
| opts | testrunner-lite options given by user |
Definition at line 562 of file testdefinitionparser.c.
| int td_next_node | ( | void | ) |
Process next node from XML reader instance.
Definition at line 713 of file testdefinitionparser.c.
| LOCAL int td_parse_case | ( | td_set * | s | ) |
Parse test case and insert to set list of cases.
| *s | td_set structure |
Definition at line 305 of file testdefinitionparser.c.
| LOCAL int td_parse_environments | ( | xmlListPtr | list | ) |
Parse set environments and save them in list
| list | used for saving the enabled environments |
Definition at line 372 of file testdefinitionparser.c.
| LOCAL int td_parse_gen_attribs | ( | td_gen_attribs * | attr, | |
| td_gen_attribs * | defaults | |||
| ) |
Definition at line 104 of file testdefinitionparser.c.
| LOCAL int td_parse_gets | ( | xmlListPtr | list | ) |
Parse get-element, add filenames to list
| list | used for saving "get" filenames |
Definition at line 420 of file testdefinitionparser.c.
| LOCAL int td_parse_set | ( | ) |
Read test set in to td_set data structure and call pass it to callback
Definition at line 497 of file testdefinitionparser.c.
| LOCAL td_step * td_parse_step | ( | ) |
Parse one step
Definition at line 171 of file testdefinitionparser.c.
| LOCAL int td_parse_steps | ( | xmlListPtr | list, | |
| const char * | tag | |||
| ) |
Parse step elements ([pre|post]_step and save them in list
| list | list into which the steps are to be inserted | |
| tag | element name |
Definition at line 240 of file testdefinitionparser.c.
| LOCAL int td_parse_suite | ( | ) |
Read test suite in to td_suite data structure and call pass it to callback
Definition at line 472 of file testdefinitionparser.c.
| void td_reader_close | ( | void | ) |
De-init the reader instance
Definition at line 703 of file testdefinitionparser.c.
| int td_reader_init | ( | testrunner_lite_options * | opts | ) |
Initialize the xml reader instance
| opts | testrunner-lite options given by user |
Definition at line 651 of file testdefinitionparser.c.
| int td_register_callbacks | ( | td_parser_callbacks * | pcbs | ) |
Set the callbacks for parser
Definition at line 750 of file testdefinitionparser.c.
| LOCAL td_parser_callbacks* cbs |
Definition at line 65 of file testdefinitionparser.c.
| LOCAL td_suite* current_suite |
Definition at line 69 of file testdefinitionparser.c.
| LOCAL xmlTextReaderPtr reader |
Definition at line 66 of file testdefinitionparser.c.
| LOCAL xmlSchemaPtr schema = NULL |
Definition at line 68 of file testdefinitionparser.c.
| LOCAL xmlSchemaParserCtxtPtr schema_context = NULL |
Definition at line 67 of file testdefinitionparser.c.
1.5.6