mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
We provide a new LIBXL_TESTS facility in the Makefile. Also provide some helpful common routines for unit tests to use. We don't want to put the weird test case entrypoints and the weird test case code in the main libxl.so library. Symbol hiding prevents us from simply directly linking the libxl_test_FOO.o in later. So instead we provide a special library libxenlight_test.so which is used only locally. There are not yet any test cases defined; that will come in the next patch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Jim Fehlig <jfehlig@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
16 lines
353 B
C
16 lines
353 B
C
#include "test_common.h"
|
|
|
|
libxl_ctx *ctx;
|
|
|
|
void test_common_setup(int level)
|
|
{
|
|
xentoollog_logger_stdiostream *logger_s
|
|
= xtl_createlogger_stdiostream(stderr, level, 0);
|
|
assert(logger_s);
|
|
|
|
xentoollog_logger *logger = (xentoollog_logger*)logger_s;
|
|
|
|
int rc = libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, logger);
|
|
assert(!rc);
|
|
}
|