mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qapi: Move qapi-schema.json to qapi/, rename generated files
Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for modules. Consistently name the generated files qapi-MODULE.EXT: qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch]. This gets rid of the temporary hacks in scripts/qapi/commands.py, scripts/qapi/events.py, and scripts/qapi/common.py. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-28-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain] Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
bb46af41b9
commit
eb815e248f
35 changed files with 119 additions and 134 deletions
6
tests/.gitignore
vendored
6
tests/.gitignore
vendored
|
@ -60,7 +60,8 @@ test-keyval
|
|||
test-logging
|
||||
test-mul64
|
||||
test-opts-visitor
|
||||
test-qapi-event.[ch]
|
||||
test-qapi-commands.[ch]
|
||||
test-qapi-events.[ch]
|
||||
test-qapi-types.[ch]
|
||||
test-qapi-util
|
||||
test-qapi-visit.[ch]
|
||||
|
@ -71,11 +72,10 @@ test-qga
|
|||
test-qht
|
||||
test-qht-par
|
||||
test-qmp-cmds
|
||||
test-qmp-commands.[ch]
|
||||
test-qmp-event
|
||||
test-qobject-input-strict
|
||||
test-qobject-input-visitor
|
||||
test-qmp-introspect.[ch]
|
||||
test-qapi-introspect.[ch]
|
||||
test-qobject-output-visitor
|
||||
test-rcu-list
|
||||
test-replication
|
||||
|
|
|
@ -570,8 +570,8 @@ qapi-schema += unknown-expr-key.json
|
|||
check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
|
||||
|
||||
GENERATED_FILES += tests/test-qapi-types.h tests/test-qapi-visit.h \
|
||||
tests/test-qmp-commands.h tests/test-qapi-event.h \
|
||||
tests/test-qmp-introspect.h
|
||||
tests/test-qapi-commands.h tests/test-qapi-events.h \
|
||||
tests/test-qapi-introspect.h
|
||||
|
||||
test-obj-y = tests/check-qnum.o tests/check-qstring.o tests/check-qdict.o \
|
||||
tests/check-qlist.o tests/check-qnull.o tests/check-qobject.o \
|
||||
|
@ -596,7 +596,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests
|
|||
test-util-obj-y = libqemuutil.a
|
||||
test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y)
|
||||
test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \
|
||||
tests/test-qapi-event.o tests/test-qmp-introspect.o \
|
||||
tests/test-qapi-events.o tests/test-qapi-introspect.o \
|
||||
$(test-qom-obj-y)
|
||||
benchmark-crypto-obj-y = $(crypto-obj-y) $(test-qom-obj-y)
|
||||
test-crypto-obj-y = $(crypto-obj-y) $(test-qom-obj-y)
|
||||
|
@ -660,9 +660,9 @@ tests/test-replication$(EXESUF): tests/test-replication.o $(test-util-obj-y) \
|
|||
|
||||
tests/test-qapi-types.c tests/test-qapi-types.h \
|
||||
tests/test-qapi-visit.c tests/test-qapi-visit.h \
|
||||
tests/test-qmp-commands.h tests/test-qmp-commands.c \
|
||||
tests/test-qapi-event.c tests/test-qapi-event.h \
|
||||
tests/test-qmp-introspect.c tests/test-qmp-introspect.h: \
|
||||
tests/test-qapi-commands.h tests/test-qapi-commands.c \
|
||||
tests/test-qapi-events.c tests/test-qapi-events.h \
|
||||
tests/test-qapi-introspect.c tests/test-qapi-introspect.h: \
|
||||
tests/test-qapi-gen-timestamp ;
|
||||
tests/test-qapi-gen-timestamp: $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(qapi-py)
|
||||
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
|
||||
|
@ -683,7 +683,7 @@ tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y)
|
|||
tests/test-qobject-output-visitor$(EXESUF): tests/test-qobject-output-visitor.o $(test-qapi-obj-y)
|
||||
tests/test-clone-visitor$(EXESUF): tests/test-clone-visitor.o $(test-qapi-obj-y)
|
||||
tests/test-qobject-input-visitor$(EXESUF): tests/test-qobject-input-visitor.o $(test-qapi-obj-y)
|
||||
tests/test-qmp-cmds$(EXESUF): tests/test-qmp-cmds.o tests/test-qmp-commands.o $(test-qapi-obj-y)
|
||||
tests/test-qmp-cmds$(EXESUF): tests/test-qmp-cmds.o tests/test-qapi-commands.o $(test-qapi-obj-y)
|
||||
tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y)
|
||||
tests/test-opts-visitor$(EXESUF): tests/test-opts-visitor.o $(test-qapi-obj-y)
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qnum.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
#include "test-qmp-commands.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qapi/qobject-input-visitor.h"
|
||||
#include "tests/test-qapi-types.h"
|
||||
#include "tests/test-qapi-visit.h"
|
||||
#include "test-qapi-commands.h"
|
||||
|
||||
static QmpCommandList qmp_commands;
|
||||
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
#include "qemu/osdep.h"
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "test-qapi-event.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/qbool.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qnum.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
#include "qapi/qmp-event.h"
|
||||
#include "test-qapi-events.h"
|
||||
|
||||
typedef struct TestEventData {
|
||||
QDict *expect;
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include "qapi/qmp/qnum.h"
|
||||
#include "qapi/qmp/qstring.h"
|
||||
#include "qapi/qmp/qjson.h"
|
||||
#include "test-qmp-introspect.h"
|
||||
#include "qmp-introspect.h"
|
||||
#include "test-qapi-introspect.h"
|
||||
#include "qapi/qapi-introspect.h"
|
||||
|
||||
typedef struct TestInputVisitorData {
|
||||
QObject *obj;
|
||||
|
@ -1376,7 +1376,7 @@ int main(int argc, char **argv)
|
|||
NULL, test_visitor_in_fail_alternate);
|
||||
input_visitor_test_add("/visitor/input/fail/union-native-list",
|
||||
NULL, test_visitor_in_fail_union_native_list);
|
||||
input_visitor_test_add("/visitor/input/qmp-introspect",
|
||||
input_visitor_test_add("/visitor/input/qapi-introspect",
|
||||
NULL, test_visitor_in_qmp_introspect);
|
||||
|
||||
g_test_run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue