tests/qtest: Introduce qtest_init_with_env
authorFabiano Rosas <farosas@suse.de>
Wed, 18 Oct 2023 19:27:31 +0000 (16:27 -0300)
committerJuan Quintela <quintela@redhat.com>
Fri, 20 Oct 2023 06:51:41 +0000 (08:51 +0200)
commit9931215bd33b640dcc824e07431e67e6ddb6b1e1
tree9cc1a3b43ffb9645b89bd35e64f8cf3a41968e1b
parentf4a7b30fcd5b60ca9b0215f9a6fa1faf9bd73f7b
tests/qtest: Introduce qtest_init_with_env

Add a version of qtest_init() that takes an environment variable
containing the path of the QEMU binary. This allows tests to use more
than one QEMU binary.

If no variable is provided or the environment variable does not exist,
that is not an error. Fallback to using QTEST_QEMU_BINARY.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231018192741.25885-3-farosas@suse.de>
tests/qtest/libqtest.c
tests/qtest/libqtest.h