This should help prevent introducing HMP tests inadvertently.
Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
---
tests/qtest/libqtest.c | 2 ++
tests/qtest/libqtest.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 370f79a3b6fb..05d884761540 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1021,6 +1021,7 @@ void qtest_qmp_job_wait(QTestState *s, const char *job_id)
qobject_unref(response);
}
+#ifdef CONFIG_HMP
char *qtest_vhmp(QTestState *s, const char *fmt, va_list ap)
{
char *cmd;
@@ -1048,6 +1049,7 @@ char *qtest_hmp(QTestState *s, const char *fmt, ...)
va_end(ap);
return ret;
}
+#endif
void qtest_qemu_io(QTestState *s, const char *device,
const char *fmt, ...)
diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h
index f06e061d214b..20982d3fe8dd 100644
--- a/tests/qtest/libqtest.h
+++ b/tests/qtest/libqtest.h
@@ -409,6 +409,7 @@ QDict *qtest_qmp_event_ref(QTestState *s, const char
*event);
*/
void qtest_qmp_job_wait(QTestState *s, const char *job_id);
+#ifdef CONFIG_HMP
/**
* qtest_hmp:
* @s: #QTestState instance to operate on.
@@ -434,6 +435,7 @@ char *qtest_hmp(QTestState *s, const char *fmt, ...)
G_GNUC_PRINTF(2, 3);
*/
char *qtest_vhmp(QTestState *s, const char *fmt, va_list ap)
G_GNUC_PRINTF(2, 0);
+#endif
/**
* qtest_qemu_io:
--
2.55.0.543.g5ebe2ebe4ea8