qtest: Add assertion that required environment variable is set

Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1427911244-22565-1-git-send-email-emaste@freebsd.org
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Ed Maste 2015-04-28 15:27:51 -04:00 committed by John Snow
parent cf5aa89e9d
commit c836867498

View File

@ -488,6 +488,7 @@ void qtest_qmp_eventwait(QTestState *s, const char *event)
const char *qtest_get_arch(void)
{
const char *qemu = getenv("QTEST_QEMU_BINARY");
g_assert(qemu != NULL);
const char *end = strrchr(qemu, '/');
return end + strlen("/qemu-system-");