netatalk  4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
testreport.c File Reference
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "testreport.h"

Data Structures

struct  testreport_case

Functions

static char * xstrdup (const char *s)
static double elapsed (const struct timespec *start, const struct timespec *end)
static void now (struct timespec *ts)
static void clear_cases (void)
int testreport_configure (const char *path, const char *suite_name)
void testreport_begin_case (void)
static void add_case (const char *name, enum testreport_result result, double duration, const char *message)
void testreport_end_case (const char *name, enum testreport_result result, const char *failure_location, const char *skip_reason)
void testreport_record_case (const char *name, enum testreport_result result, const char *message)
static void xml_escape (FILE *stream, const char *text)
static int write_report (FILE *stream)
int testreport_finalize (void)

Variables

static char * report_path
static char * report_suite
static struct testreport_casereport_cases
static size_t report_case_count
static size_t report_case_capacity
static bool report_failed
static struct timespec report_started
static struct timespec case_started

Function Documentation

◆ add_case()

void add_case ( const char * name,
enum testreport_result result,
double duration,
const char * message )
static

◆ clear_cases()

void clear_cases ( void )
static

◆ elapsed()

double elapsed ( const struct timespec * start,
const struct timespec * end )
static

◆ now()

void now ( struct timespec * ts)
static

◆ testreport_begin_case()

void testreport_begin_case ( void )

◆ testreport_configure()

int testreport_configure ( const char * path,
const char * suite_name )

◆ testreport_end_case()

void testreport_end_case ( const char * name,
enum testreport_result result,
const char * failure_location,
const char * skip_reason )

◆ testreport_finalize()

int testreport_finalize ( void )

◆ testreport_record_case()

void testreport_record_case ( const char * name,
enum testreport_result result,
const char * message )

◆ write_report()

int write_report ( FILE * stream)
static

◆ xml_escape()

void xml_escape ( FILE * stream,
const char * text )
static

◆ xstrdup()

char * xstrdup ( const char * s)
static

Variable Documentation

◆ case_started

struct timespec case_started
static

◆ report_case_capacity

size_t report_case_capacity
static

◆ report_case_count

size_t report_case_count
static

◆ report_cases

struct testreport_case* report_cases
static

◆ report_failed

bool report_failed
static

◆ report_path

char* report_path
static

◆ report_started

struct timespec report_started
static

◆ report_suite

char* report_suite
static