3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-20 04:19:25 +01:00

test-runner: Set host dependent qemu executable path list

This commit is contained in:
Andrew Zaborowski 2017-05-14 04:40:24 +02:00 committed by Denis Kenzior
parent 694a95ba9e
commit a2b9cd0726

View File

@ -76,13 +76,31 @@ static const char *exec_home;
static const char *test_action_params; static const char *test_action_params;
static char top_level_path[PATH_MAX]; static char top_level_path[PATH_MAX];
#ifdef __i386__
/*
* If iwd is being compiled for i386, prefer the i386 qemu but try the
* X86-64 version as a fallback.
*/
static const char * const qemu_table[] = { static const char * const qemu_table[] = {
"qemu-system-x86_64",
"qemu-system-i386", "qemu-system-i386",
"/usr/bin/qemu-system-x86_64",
"/usr/bin/qemu-system-i386", "/usr/bin/qemu-system-i386",
"qemu-system-x86_64",
"/usr/bin/qemu-system-x86_64",
NULL NULL
}; };
#elif defined(__x86_64__)
/*
* If iwd is being built for 64 bits there's no point booting a 32-bit only
* system.
*/
static const char * const qemu_table[] = {
"qemu-system-x86_64",
"/usr/bin/qemu-system-x86_64",
NULL
};
#else
#warning Qemu binary name not defined for this architecture yet
#endif
struct wiphy { struct wiphy {
char name[20]; char name[20];