Skip to content

Commit

Permalink
Add panda_callbacks_qmp stub in qtest so qmp tests can run without panda
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fasano committed Dec 6, 2023
1 parent 6447808 commit b07c387
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qapi/qmp-dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
#include "qapi/qmp/qjson.h"
#include "qapi-types.h"
#include "qapi/qmp/qerror.h"

//#include "panda/callbacks/cb-support.h"
extern bool panda_callbacks_qmp(char *command, char* args, char **result);
// And we have a stub in stubs/qtest.c that always returns false if we build
// without panda for tests

static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp)
{
Expand Down
6 changes: 6 additions & 0 deletions stubs/qtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ bool qtest_driver(void)
{
return false;
}

/* Needed for qmp-dispatch tests to pass when we don't have panda */
bool panda_callbacks_qmp(char *command, char* args, char **result);
bool panda_callbacks_qmp(char *command, char* args, char **result) {
return false;
}

0 comments on commit b07c387

Please sign in to comment.