libvirt/tests/testutils.h
Mark McLoughlin d7ed2c18e1 Dump qemu driver capabilities if test debugging enabled
* src/testutils.[ch]: make testDebug externally available

* src/testutilsqemu.c: if VIR_TEST_DEBUG is set, dump the qemu
  driver capabilities to stderr
2009-09-10 12:37:42 +01:00

49 lines
1.2 KiB
C

/*
* utils.c: test utils
*
* Copyright (C) 2005, 2008 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Karel Zak <kzak@redhat.com>
*/
#ifndef __VIT_TEST_UTILS_H__
#define __VIT_TEST_UTILS_H__
#include <stdio.h>
double virtTestCountAverage(double *items,
int nitems);
int virtTestRun(const char *title,
int nloops,
int (*body)(const void *data),
const void *data);
int virtTestLoadFile(const char *name,
char **buf,
int buflen);
int virtTestCaptureProgramOutput(const char *const argv[],
char **buf,
int buflen);
int virtTestClearLineRegex(const char *pattern,
char *string);
int virtTestDifference(FILE *stream,
const char *expect,
const char *actual);
int virtTestMain(int argc,
char **argv,
int (*func)(int, char **));
#define VIRT_TEST_MAIN(func) \
int main(int argc, char **argv) { \
return virtTestMain(argc,argv, func); \
}
extern unsigned int testDebug;
#endif /* __VIT_TEST_UTILS_H__ */