build-sys: build ui-spice-app as a module
[qemu/ar7.git] / tests / modules-test.c
bloba8118e9042741060594581dc2cb3207d0866a381
1 #include "qemu/osdep.h"
2 #include "libqtest.h"
4 static void test_modules_load(const void *data)
6 QTestState *qts;
7 const char **args = (const char **)data;
9 qts = qtest_init(NULL);
10 qtest_module_load(qts, args[0], args[1]);
11 qtest_quit(qts);
14 int main(int argc, char *argv[])
16 const char *modules[] = {
17 #ifdef CONFIG_CURL
18 "block-", "curl",
19 #endif
20 #ifdef CONFIG_GLUSTERFS
21 "block-", "gluster",
22 #endif
23 #ifdef CONFIG_LIBISCSI
24 "block-", "iscsi",
25 #endif
26 #ifdef CONFIG_LIBNFS
27 "block-", "nfs",
28 #endif
29 #ifdef CONFIG_LIBSSH
30 "block-", "ssh",
31 #endif
32 #ifdef CONFIG_RBD
33 "block-", "rbd",
34 #endif
35 #ifdef CONFIG_AUDIO_ALSA
36 "audio-", "alsa",
37 #endif
38 #ifdef CONFIG_AUDIO_OSS
39 "audio-", "oss",
40 #endif
41 #ifdef CONFIG_AUDIO_PA
42 "audio-", "pa",
43 #endif
44 #ifdef CONFIG_AUDIO_SDL
45 "audio-", "sdl",
46 #endif
47 #ifdef CONFIG_CURSES
48 "ui-", "curses",
49 #endif
50 #if defined(CONFIG_GTK) && defined(CONFIG_VTE)
51 "ui-", "gtk",
52 #endif
53 #ifdef CONFIG_SDL
54 "ui-", "sdl",
55 #endif
56 #if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
57 "ui-", "spice-app",
58 #endif
60 int i;
62 g_test_init(&argc, &argv, NULL);
64 for (i = 0; i < G_N_ELEMENTS(modules); i += 2) {
65 char *testname = g_strdup_printf("/module/load/%s", modules[i + 1]);
66 qtest_add_data_func(testname, modules + i, test_modules_load);
67 g_free(testname);
70 return g_test_run();