Received: from eggs.gnu.org ([2001:4830:134:3::10]:44590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJPkY-0002Oy-Mg for qemu-devel@nongnu.org; Fri, 28 Feb 2014 10:53:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJPkS-00078P-Bs for qemu-devel@nongnu.org; Fri, 28 Feb 2014 10:53:22 -0500 Received: from roura.ac.upc.edu ([147.83.33.10]:56593 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJPkR-00077l-VX for qemu-devel@nongnu.org; Fri, 28 Feb 2014 10:53:16 -0500 From: =?utf-8?b?TGx1w61z?= Vilanova Date: Fri, 28 Feb 2014 16:53:10 +0100 Message-Id: <20140228155309.28087.96600.stgit@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v4 0/3] qapi: Allow modularization of QAPI schema files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Adds the "include(...)" primitive to the syntax of QAPI schema files, all= owing these to be modularized into multiple per-topic files in the future. Signed-off-by: Llu=C3=ADs Vilanova --- Changes in v4: * Rebase on 3e890c7. * Minor cosmetic changes. * Fix recording of included files in case of a cycle error. * Add a more complex include cycle test. Changes in v3: * Fix documentation examples regarding how the input file is passed to th= e scripts. * Add documentation for the 'include' directive. * Detect inclusion loops. * Fix "tests/qapi-schema/test-qapi.py" and "tests/Makefile" to use an exp= licit input file when running tests. * Fix QAPI tests to cope with an explicit input file. * Add tests for the "include" directive. Changes in v2: * Change the scripts to use an explicit input file instead of standard in= put. * Fix "tests/Makefile" to use the new argument. * Get the input directory for the "include" directive from the input file dirname. Llu=C3=ADs Vilanova (3): qapi: Use an explicit input file qapi: Add a primitive to include other files from a QAPI schema fil= e qapi: Add tests for the "include" directive Makefile | 24 ++++++++++--- docs/qapi-code-gen.txt | 12 +++++- scripts/qapi-commands.py | 10 ++++- scripts/qapi-types.py | 9 +++-- scripts/qapi-visit.py | 9 +++-- scripts/qapi.py | 47 +++++++++++++++++++= ++++-- tests/Makefile | 18 +++++++--- tests/qapi-schema/funny-char.err | 2 + tests/qapi-schema/include-cycle-b.json | 1 + tests/qapi-schema/include-cycle-c.json | 1 + tests/qapi-schema/include-cycle.err | 1 + tests/qapi-schema/include-cycle.exit | 1 + tests/qapi-schema/include-cycle.json | 1 + tests/qapi-schema/include-cycle.out | 0=20 tests/qapi-schema/include-nested-err.err | 1 + tests/qapi-schema/include-nested-err.exit | 1 + tests/qapi-schema/include-nested-err.json | 1 + tests/qapi-schema/include-nested-err.out | 0=20 tests/qapi-schema/include-no-file.err | 1 + tests/qapi-schema/include-no-file.exit | 1 + tests/qapi-schema/include-no-file.json | 1 + tests/qapi-schema/include-no-file.out | 0=20 tests/qapi-schema/include-self-cycle.err | 1 + tests/qapi-schema/include-self-cycle.exit | 1 + tests/qapi-schema/include-self-cycle.json | 1 + tests/qapi-schema/include-self-cycle.out | 0=20 tests/qapi-schema/include-simple-sub.json | 2 + tests/qapi-schema/include-simple.err | 0=20 tests/qapi-schema/include-simple.exit | 1 + tests/qapi-schema/include-simple.json | 1 + tests/qapi-schema/include-simple.out | 3 ++ tests/qapi-schema/missing-colon.err | 2 + tests/qapi-schema/missing-comma-list.err | 2 + tests/qapi-schema/missing-comma-object.err | 2 + tests/qapi-schema/non-objects.err | 2 + tests/qapi-schema/quoted-structural-chars.err | 2 + tests/qapi-schema/test-qapi.py | 3 +- tests/qapi-schema/trailing-comma-list.err | 2 + tests/qapi-schema/trailing-comma-object.err | 2 + tests/qapi-schema/unclosed-list.err | 2 + tests/qapi-schema/unclosed-object.err | 2 + tests/qapi-schema/unclosed-string.err | 2 + 42 files changed, 137 insertions(+), 38 deletions(-) create mode 100644 tests/qapi-schema/include-cycle-b.json create mode 100644 tests/qapi-schema/include-cycle-c.json create mode 100644 tests/qapi-schema/include-cycle.err create mode 100644 tests/qapi-schema/include-cycle.exit create mode 100644 tests/qapi-schema/include-cycle.json create mode 100644 tests/qapi-schema/include-cycle.out create mode 100644 tests/qapi-schema/include-nested-err.err create mode 100644 tests/qapi-schema/include-nested-err.exit create mode 100644 tests/qapi-schema/include-nested-err.json create mode 100644 tests/qapi-schema/include-nested-err.out create mode 100644 tests/qapi-schema/include-no-file.err create mode 100644 tests/qapi-schema/include-no-file.exit create mode 100644 tests/qapi-schema/include-no-file.json create mode 100644 tests/qapi-schema/include-no-file.out create mode 100644 tests/qapi-schema/include-self-cycle.err create mode 100644 tests/qapi-schema/include-self-cycle.exit create mode 100644 tests/qapi-schema/include-self-cycle.json create mode 100644 tests/qapi-schema/include-self-cycle.out create mode 100644 tests/qapi-schema/include-simple-sub.json create mode 100644 tests/qapi-schema/include-simple.err create mode 100644 tests/qapi-schema/include-simple.exit create mode 100644 tests/qapi-schema/include-simple.json create mode 100644 tests/qapi-schema/include-simple.out To: qemu-devel@nongnu.org Cc: Luiz Capitulino Cc: Markus Armbruster Cc: Eric Blake