summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/bad-if-empty.exit
diff options
context:
space:
mode:
authorMarc-André Lureau2018-07-03 17:56:35 +0200
committerMarkus Armbruster2018-07-03 18:21:24 +0200
commit967c885108f18e5065744719f7959ba5ea0a5b0d (patch)
treeb2138075fca0ddc4ca19454502ed0c376b8bc190 /tests/qapi-schema/bad-if-empty.exit
parentMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180703' into... (diff)
downloadqemu-967c885108f18e5065744719f7959ba5ea0a5b0d.tar.gz
qemu-967c885108f18e5065744719f7959ba5ea0a5b0d.tar.xz
qemu-967c885108f18e5065744719f7959ba5ea0a5b0d.zip
qapi: add 'if' to top-level expressions
Accept 'if' key in top-level elements, accepted as string or list of string type. The following patches will modify the test visitor to check the value is correctly saved, and generate #if/#endif code (as a single #if/endif line or a series for a list). Example of 'if' key: { 'struct': 'TestIfStruct', 'data': { 'foo': 'int' }, 'if': 'defined(TEST_IF_STRUCT)' } The generated code is for now *unconditional*. Later patches generate the conditionals. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180703155648.11933-2-marcandre.lureau@redhat.com> [Commit message and Documentation improved] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/bad-if-empty.exit')
-rw-r--r--tests/qapi-schema/bad-if-empty.exit1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qapi-schema/bad-if-empty.exit b/tests/qapi-schema/bad-if-empty.exit
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/tests/qapi-schema/bad-if-empty.exit
@@ -0,0 +1 @@
+1