]> git.proxmox.com Git - mirror_qemu.git/blame - tests/modules-test.c
tests/libqos/e1000e: Make e1000e libqos functions independent from global_qtest
[mirror_qemu.git] / tests / modules-test.c
CommitLineData
eb062cfa
MAL
1#include "qemu/osdep.h"
2#include "libqtest.h"
3
d39b6263
MAL
4const char common_args[] = "-nodefaults -machine none";
5
eb062cfa
MAL
6static void test_modules_load(const void *data)
7{
8 QTestState *qts;
0712c1b1 9 const char **args = (const char **)data;
eb062cfa 10
d39b6263 11 qts = qtest_init(common_args);
eb062cfa
MAL
12 qtest_module_load(qts, args[0], args[1]);
13 qtest_quit(qts);
14}
15
16int main(int argc, char *argv[])
17{
18 const char *modules[] = {
19#ifdef CONFIG_CURL
20 "block-", "curl",
21#endif
22#ifdef CONFIG_GLUSTERFS
23 "block-", "gluster",
24#endif
25#ifdef CONFIG_LIBISCSI
26 "block-", "iscsi",
27#endif
28#ifdef CONFIG_LIBNFS
29 "block-", "nfs",
30#endif
31#ifdef CONFIG_LIBSSH
32 "block-", "ssh",
33#endif
34#ifdef CONFIG_RBD
35 "block-", "rbd",
36#endif
37#ifdef CONFIG_AUDIO_ALSA
38 "audio-", "alsa",
39#endif
40#ifdef CONFIG_AUDIO_OSS
41 "audio-", "oss",
42#endif
43#ifdef CONFIG_AUDIO_PA
44 "audio-", "pa",
45#endif
46#ifdef CONFIG_AUDIO_SDL
47 "audio-", "sdl",
48#endif
49#ifdef CONFIG_CURSES
50 "ui-", "curses",
51#endif
52#if defined(CONFIG_GTK) && defined(CONFIG_VTE)
53 "ui-", "gtk",
54#endif
55#ifdef CONFIG_SDL
56 "ui-", "sdl",
f54d432e
MAL
57#endif
58#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
59 "ui-", "spice-app",
eb062cfa
MAL
60#endif
61 };
62 int i;
63
64 g_test_init(&argc, &argv, NULL);
65
66 for (i = 0; i < G_N_ELEMENTS(modules); i += 2) {
67 char *testname = g_strdup_printf("/module/load/%s", modules[i + 1]);
68 qtest_add_data_func(testname, modules + i, test_modules_load);
69 g_free(testname);
70 }
71
72 return g_test_run();
73}