From nobody Tue Dec 16 08:32:07 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1597080644; cv=none; d=zohomail.com; s=zohoarc; b=cK7EJB0Y+uE++Ri7LxysiJCqnzMLTLejp9TzG2tLbxsaroa1QX+/JleixNiGyApgdv/S2e1+WhCdGC1cpXH+iIZVPCb0QScBqcHAz/QWouUeyS9V0mzdJo9ApZ3SUGuBPqma8zMCBlgQB5E8Xx8pFIGAHljPYCL8jaW+eVwnr8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597080644; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=S2HU21n7c9VQf5Q+uHozZWvjxefhUZqRf30/JH02dIk=; b=DLerVBvivr8D8J0AO72gl9LfrCEWj3PHbSSBtFif+uGVesmNyvsbzSJSOI0iEm+3kmQdX1kOoVg/rx/YSuM6I/oHrm3JHJTcQP9zpnmxwRcSnoLfAMtL7zdPX9ag+D+R8cRqfssOf/cGNyZlx3SM4LDx6Zalg+oOrwZk92so0Sg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597080644946566.1400416704171; Mon, 10 Aug 2020 10:30:44 -0700 (PDT) Received: from localhost ([::1]:50596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5BdD-00073F-Eo for importer@patchew.org; Mon, 10 Aug 2020 13:30:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5BJo-00089N-FF for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:10:40 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:35585 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k5BJl-0002zg-DO for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:10:40 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-4zrxP57hPVC67PjmJ5BIIQ-1; Mon, 10 Aug 2020 13:10:33 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97783107ACCA for ; Mon, 10 Aug 2020 17:10:32 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBBB85F1E9 for ; Mon, 10 Aug 2020 17:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597079436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=S2HU21n7c9VQf5Q+uHozZWvjxefhUZqRf30/JH02dIk=; b=IPjD6kLtC9PO2I8gV/u9gHrfA478rHit20V6cQp+3upbczR8IqARBRJW53oqW3910fmi+P ZzZcHQj5xVCwddTW6ro+HXOW3HV3Vwka8mvmDhBcbV1HxTcX4G9g86TJAfAILZQ6bd46Az oxGyRApkeqqPOMEJ12Zd0SkYw+zvoNo= X-MC-Unique: 4zrxP57hPVC67PjmJ5BIIQ-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 051/147] meson: convert check-qapi-schema Date: Mon, 10 Aug 2020 19:07:29 +0200 Message-Id: <1597079345-42801-52-git-send-email-pbonzini@redhat.com> In-Reply-To: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> References: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 03:29:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 218 +-------------------------------------= ---- tests/meson.build | 2 + tests/qapi-schema/meson.build | 216 ++++++++++++++++++++++++++++++++++++++= +++ 3 files changed, 220 insertions(+), 216 deletions(-) create mode 100644 tests/qapi-schema/meson.build diff --git a/tests/Makefile.include b/tests/Makefile.include index b3f8fdd..676d099 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -161,201 +161,6 @@ check-unit-y +=3D tests/test-qapi-util$(EXESUF) =20 check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) +=3D tests/chec= k-block.sh =20 -qapi-schema +=3D alternate-any.json -qapi-schema +=3D alternate-array.json -qapi-schema +=3D alternate-base.json -qapi-schema +=3D alternate-branch-if-invalid.json -qapi-schema +=3D alternate-clash.json -qapi-schema +=3D alternate-conflict-dict.json -qapi-schema +=3D alternate-conflict-enum-bool.json -qapi-schema +=3D alternate-conflict-enum-int.json -qapi-schema +=3D alternate-conflict-string.json -qapi-schema +=3D alternate-conflict-bool-string.json -qapi-schema +=3D alternate-conflict-num-string.json -qapi-schema +=3D alternate-empty.json -qapi-schema +=3D alternate-invalid-dict.json -qapi-schema +=3D alternate-nested.json -qapi-schema +=3D alternate-unknown.json -qapi-schema +=3D args-alternate.json -qapi-schema +=3D args-any.json -qapi-schema +=3D args-array-empty.json -qapi-schema +=3D args-array-unknown.json -qapi-schema +=3D args-bad-boxed.json -qapi-schema +=3D args-boxed-anon.json -qapi-schema +=3D args-boxed-string.json -qapi-schema +=3D args-int.json -qapi-schema +=3D args-invalid.json -qapi-schema +=3D args-member-array-bad.json -qapi-schema +=3D args-member-case.json -qapi-schema +=3D args-member-unknown.json -qapi-schema +=3D args-name-clash.json -qapi-schema +=3D args-union.json -qapi-schema +=3D args-unknown.json -qapi-schema +=3D bad-base.json -qapi-schema +=3D bad-data.json -qapi-schema +=3D bad-ident.json -qapi-schema +=3D bad-if.json -qapi-schema +=3D bad-if-empty.json -qapi-schema +=3D bad-if-empty-list.json -qapi-schema +=3D bad-if-list.json -qapi-schema +=3D bad-type-bool.json -qapi-schema +=3D bad-type-dict.json -qapi-schema +=3D bad-type-int.json -qapi-schema +=3D base-cycle-direct.json -qapi-schema +=3D base-cycle-indirect.json -qapi-schema +=3D command-int.json -qapi-schema +=3D comments.json -qapi-schema +=3D doc-bad-alternate-member.json -qapi-schema +=3D doc-bad-boxed-command-arg.json -qapi-schema +=3D doc-bad-command-arg.json -qapi-schema +=3D doc-bad-enum-member.json -qapi-schema +=3D doc-bad-event-arg.json -qapi-schema +=3D doc-bad-feature.json -qapi-schema +=3D doc-bad-section.json -qapi-schema +=3D doc-bad-symbol.json -qapi-schema +=3D doc-bad-union-member.json -qapi-schema +=3D doc-before-include.json -qapi-schema +=3D doc-before-pragma.json -qapi-schema +=3D doc-duplicated-arg.json -qapi-schema +=3D doc-duplicated-return.json -qapi-schema +=3D doc-duplicated-since.json -qapi-schema +=3D doc-empty-arg.json -qapi-schema +=3D doc-empty-section.json -qapi-schema +=3D doc-empty-symbol.json -qapi-schema +=3D doc-good.json -qapi-schema +=3D doc-interleaved-section.json -qapi-schema +=3D doc-invalid-end.json -qapi-schema +=3D doc-invalid-end2.json -qapi-schema +=3D doc-invalid-return.json -qapi-schema +=3D doc-invalid-section.json -qapi-schema +=3D doc-invalid-start.json -qapi-schema +=3D doc-missing-colon.json -qapi-schema +=3D doc-missing-expr.json -qapi-schema +=3D doc-missing-space.json -qapi-schema +=3D doc-missing.json -qapi-schema +=3D doc-no-symbol.json -qapi-schema +=3D doc-undoc-feature.json -qapi-schema +=3D double-type.json -qapi-schema +=3D duplicate-key.json -qapi-schema +=3D empty.json -qapi-schema +=3D enum-bad-member.json -qapi-schema +=3D enum-bad-name.json -qapi-schema +=3D enum-bad-prefix.json -qapi-schema +=3D enum-clash-member.json -qapi-schema +=3D enum-dict-member-unknown.json -qapi-schema +=3D enum-if-invalid.json -qapi-schema +=3D enum-int-member.json -qapi-schema +=3D enum-member-case.json -qapi-schema +=3D enum-missing-data.json -qapi-schema +=3D enum-wrong-data.json -qapi-schema +=3D event-boxed-empty.json -qapi-schema +=3D event-case.json -qapi-schema +=3D event-member-invalid-dict.json -qapi-schema +=3D event-nest-struct.json -qapi-schema +=3D features-bad-type.json -qapi-schema +=3D features-deprecated-type.json -qapi-schema +=3D features-duplicate-name.json -qapi-schema +=3D features-if-invalid.json -qapi-schema +=3D features-missing-name.json -qapi-schema +=3D features-name-bad-type.json -qapi-schema +=3D features-no-list.json -qapi-schema +=3D features-unknown-key.json -qapi-schema +=3D flat-union-array-branch.json -qapi-schema +=3D flat-union-bad-base.json -qapi-schema +=3D flat-union-bad-discriminator.json -qapi-schema +=3D flat-union-base-any.json -qapi-schema +=3D flat-union-base-union.json -qapi-schema +=3D flat-union-clash-member.json -qapi-schema +=3D flat-union-discriminator-bad-name.json -qapi-schema +=3D flat-union-empty.json -qapi-schema +=3D flat-union-inline.json -qapi-schema +=3D flat-union-inline-invalid-dict.json -qapi-schema +=3D flat-union-int-branch.json -qapi-schema +=3D flat-union-invalid-branch-key.json -qapi-schema +=3D flat-union-invalid-discriminator.json -qapi-schema +=3D flat-union-invalid-if-discriminator.json -qapi-schema +=3D flat-union-no-base.json -qapi-schema +=3D flat-union-optional-discriminator.json -qapi-schema +=3D flat-union-string-discriminator.json -qapi-schema +=3D funny-char.json -qapi-schema +=3D funny-word.json -qapi-schema +=3D ident-with-escape.json -qapi-schema +=3D include-before-err.json -qapi-schema +=3D include-cycle.json -qapi-schema +=3D include-extra-junk.json -qapi-schema +=3D include-nested-err.json -qapi-schema +=3D include-no-file.json -qapi-schema +=3D include-non-file.json -qapi-schema +=3D include-repetition.json -qapi-schema +=3D include-self-cycle.json -qapi-schema +=3D include-simple.json -qapi-schema +=3D indented-expr.json -qapi-schema +=3D leading-comma-list.json -qapi-schema +=3D leading-comma-object.json -qapi-schema +=3D missing-colon.json -qapi-schema +=3D missing-comma-list.json -qapi-schema +=3D missing-comma-object.json -qapi-schema +=3D missing-type.json -qapi-schema +=3D nested-struct-data.json -qapi-schema +=3D nested-struct-data-invalid-dict.json -qapi-schema +=3D non-objects.json -qapi-schema +=3D oob-test.json -qapi-schema +=3D allow-preconfig-test.json -qapi-schema +=3D pragma-doc-required-crap.json -qapi-schema +=3D pragma-extra-junk.json -qapi-schema +=3D pragma-name-case-whitelist-crap.json -qapi-schema +=3D pragma-non-dict.json -qapi-schema +=3D pragma-unknown.json -qapi-schema +=3D pragma-returns-whitelist-crap.json -qapi-schema +=3D qapi-schema-test.json -qapi-schema +=3D quoted-structural-chars.json -qapi-schema +=3D redefined-builtin.json -qapi-schema +=3D redefined-command.json -qapi-schema +=3D redefined-event.json -qapi-schema +=3D redefined-type.json -qapi-schema +=3D reserved-command-q.json -qapi-schema +=3D reserved-enum-q.json -qapi-schema +=3D reserved-member-has.json -qapi-schema +=3D reserved-member-q.json -qapi-schema +=3D reserved-member-u.json -qapi-schema +=3D reserved-member-underscore.json -qapi-schema +=3D reserved-type-kind.json -qapi-schema +=3D reserved-type-list.json -qapi-schema +=3D returns-alternate.json -qapi-schema +=3D returns-array-bad.json -qapi-schema +=3D returns-dict.json -qapi-schema +=3D returns-unknown.json -qapi-schema +=3D returns-whitelist.json -qapi-schema +=3D string-code-point-31.json -qapi-schema +=3D string-code-point-127.json -qapi-schema +=3D struct-base-clash-deep.json -qapi-schema +=3D struct-base-clash.json -qapi-schema +=3D struct-data-invalid.json -qapi-schema +=3D struct-member-if-invalid.json -qapi-schema +=3D struct-member-invalid-dict.json -qapi-schema +=3D struct-member-invalid.json -qapi-schema +=3D trailing-comma-list.json -qapi-schema +=3D trailing-comma-object.json -qapi-schema +=3D type-bypass-bad-gen.json -qapi-schema +=3D unclosed-list.json -qapi-schema +=3D unclosed-object.json -qapi-schema +=3D unclosed-string.json -qapi-schema +=3D union-base-empty.json -qapi-schema +=3D union-base-no-discriminator.json -qapi-schema +=3D union-branch-case.json -qapi-schema +=3D union-branch-if-invalid.json -qapi-schema +=3D union-branch-invalid-dict.json -qapi-schema +=3D union-clash-branches.json -qapi-schema +=3D union-empty.json -qapi-schema +=3D union-invalid-base.json -qapi-schema +=3D union-optional-branch.json -qapi-schema +=3D union-unknown.json -qapi-schema +=3D unknown-escape.json -qapi-schema +=3D unknown-expr-key.json - - -check-qapi-schema-y :=3D $(addprefix tests/qapi-schema/, $(qapi-schema)) - generated-files-y +=3D tests/test-qapi-types.h generated-files-y +=3D tests/include/test-qapi-types-sub-module.h generated-files-y +=3D tests/test-qapi-types-sub-sub-module.h @@ -501,13 +306,6 @@ tests/test-qapi-gen-timestamp: \ @rm -f tests/test-qapi-doc.texi @>$@ =20 -tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-go= od.json $(qapi-py) - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ - -o tests/qapi-schema -p "doc-good-" $<, \ - "GEN","$@") - @mv tests/qapi-schema/doc-good-qapi-doc.texi $@ - @rm -f tests/qapi-schema/doc-good-qapi-*.[ch] tests/qapi-schema/doc-good-= qmp-*.[ch] - tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-= vmstate1-gen-timestamp ; tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmst= ate1.xml $(call quiet-command,$(GDBUS_CODEGEN) $< \ @@ -720,7 +518,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES) .PHONY: clean-tcg clean-tcg: $(CLEAN_TCG_TARGET_RULES) =20 -# Other tests =20 QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) =3D te= sts/qemu-iotests/socket_scm_helper$(EXESUF) =20 @@ -730,16 +527,6 @@ check-tests/check-block.sh: tests/check-block.sh qemu-= img$(EXESUF) \ $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS))) @$< =20 -.PHONY: check-tests/qapi-schema/frontend -check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-s= chema-y)) - $(call quiet-command, PYTHONPATH=3D$(SRC_PATH)/scripts \ - PYTHONIOENCODING=3Dutf-8 $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-q= api.py $^, \ - TEST, check-qapi-schema) - -.PHONY: check-tests/qapi-schema/doc-good.texi -check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi - @diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $< - # Python venv for running tests =20 .PHONY: check-venv check-acceptance @@ -793,15 +580,14 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get= -vm-images =20 # Consolidated targets =20 -.PHONY: check-block check-qapi-schema check-qtest check-unit check check-c= lean get-vm-images -check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schem= a/doc-good.texi +.PHONY: check-block check-qtest check-unit check check-clean get-vm-images check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) ifeq ($(CONFIG_TOOLS),y) check-block: $(patsubst %,check-%, $(check-block-y)) endif check-build: build-unit build-qtest =20 -check: check-block check-qapi-schema check-unit check-qtest +check: check-block check-unit check-qtest check-clean: rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(tar= get)-y:%=3Dtests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=3Dtests/qtest= /%$(EXESUF))) diff --git a/tests/meson.build b/tests/meson.build index ec26f92..8be9c22 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -6,3 +6,5 @@ test('decodetree', sh, if 'CONFIG_TCG' in config_host subdir('fp') endif + +subdir('qapi-schema') diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build new file mode 100644 index 0000000..9dc453c --- /dev/null +++ b/tests/qapi-schema/meson.build @@ -0,0 +1,216 @@ +test_env =3D environment() +test_env.set('PYTHONPATH', meson.source_root() / 'scripts') +test_env.set('PYTHONIOENCODING', 'utf-8') + +schemas =3D [ + 'alternate-any.json', + 'alternate-array.json', + 'alternate-base.json', + 'alternate-branch-if-invalid.json', + 'alternate-clash.json', + 'alternate-conflict-dict.json', + 'alternate-conflict-enum-bool.json', + 'alternate-conflict-enum-int.json', + 'alternate-conflict-string.json', + 'alternate-conflict-bool-string.json', + 'alternate-conflict-num-string.json', + 'alternate-empty.json', + 'alternate-invalid-dict.json', + 'alternate-nested.json', + 'alternate-unknown.json', + 'args-alternate.json', + 'args-any.json', + 'args-array-empty.json', + 'args-array-unknown.json', + 'args-bad-boxed.json', + 'args-boxed-anon.json', + 'args-boxed-string.json', + 'args-int.json', + 'args-invalid.json', + 'args-member-array-bad.json', + 'args-member-case.json', + 'args-member-unknown.json', + 'args-name-clash.json', + 'args-union.json', + 'args-unknown.json', + 'bad-base.json', + 'bad-data.json', + 'bad-ident.json', + 'bad-if.json', + 'bad-if-empty.json', + 'bad-if-empty-list.json', + 'bad-if-list.json', + 'bad-type-bool.json', + 'bad-type-dict.json', + 'bad-type-int.json', + 'base-cycle-direct.json', + 'base-cycle-indirect.json', + 'command-int.json', + 'comments.json', + 'doc-bad-alternate-member.json', + 'doc-bad-boxed-command-arg.json', + 'doc-bad-command-arg.json', + 'doc-bad-enum-member.json', + 'doc-bad-event-arg.json', + 'doc-bad-feature.json', + 'doc-bad-section.json', + 'doc-bad-symbol.json', + 'doc-bad-union-member.json', + 'doc-before-include.json', + 'doc-before-pragma.json', + 'doc-duplicated-arg.json', + 'doc-duplicated-return.json', + 'doc-duplicated-since.json', + 'doc-empty-arg.json', + 'doc-empty-section.json', + 'doc-empty-symbol.json', + 'doc-good.json', + 'doc-interleaved-section.json', + 'doc-invalid-end.json', + 'doc-invalid-end2.json', + 'doc-invalid-return.json', + 'doc-invalid-section.json', + 'doc-invalid-start.json', + 'doc-missing-colon.json', + 'doc-missing-expr.json', + 'doc-missing-space.json', + 'doc-missing.json', + 'doc-no-symbol.json', + 'doc-undoc-feature.json', + 'double-type.json', + 'duplicate-key.json', + 'empty.json', + 'enum-bad-member.json', + 'enum-bad-name.json', + 'enum-bad-prefix.json', + 'enum-clash-member.json', + 'enum-dict-member-unknown.json', + 'enum-if-invalid.json', + 'enum-int-member.json', + 'enum-member-case.json', + 'enum-missing-data.json', + 'enum-wrong-data.json', + 'event-boxed-empty.json', + 'event-case.json', + 'event-member-invalid-dict.json', + 'event-nest-struct.json', + 'features-bad-type.json', + 'features-deprecated-type.json', + 'features-duplicate-name.json', + 'features-if-invalid.json', + 'features-missing-name.json', + 'features-name-bad-type.json', + 'features-no-list.json', + 'features-unknown-key.json', + 'flat-union-array-branch.json', + 'flat-union-bad-base.json', + 'flat-union-bad-discriminator.json', + 'flat-union-base-any.json', + 'flat-union-base-union.json', + 'flat-union-clash-member.json', + 'flat-union-discriminator-bad-name.json', + 'flat-union-empty.json', + 'flat-union-inline.json', + 'flat-union-inline-invalid-dict.json', + 'flat-union-int-branch.json', + 'flat-union-invalid-branch-key.json', + 'flat-union-invalid-discriminator.json', + 'flat-union-invalid-if-discriminator.json', + 'flat-union-no-base.json', + 'flat-union-optional-discriminator.json', + 'flat-union-string-discriminator.json', + 'funny-char.json', + 'funny-word.json', + 'ident-with-escape.json', + 'include-before-err.json', + 'include-cycle.json', + 'include-extra-junk.json', + 'include-nested-err.json', + 'include-no-file.json', + 'include-non-file.json', + 'include-repetition.json', + 'include-self-cycle.json', + 'include-simple.json', + 'indented-expr.json', + 'leading-comma-list.json', + 'leading-comma-object.json', + 'missing-colon.json', + 'missing-comma-list.json', + 'missing-comma-object.json', + 'missing-type.json', + 'nested-struct-data.json', + 'nested-struct-data-invalid-dict.json', + 'non-objects.json', + 'oob-test.json', + 'allow-preconfig-test.json', + 'pragma-doc-required-crap.json', + 'pragma-extra-junk.json', + 'pragma-name-case-whitelist-crap.json', + 'pragma-non-dict.json', + 'pragma-unknown.json', + 'pragma-returns-whitelist-crap.json', + 'qapi-schema-test.json', + 'quoted-structural-chars.json', + 'redefined-builtin.json', + 'redefined-command.json', + 'redefined-event.json', + 'redefined-type.json', + 'reserved-command-q.json', + 'reserved-enum-q.json', + 'reserved-member-has.json', + 'reserved-member-q.json', + 'reserved-member-u.json', + 'reserved-member-underscore.json', + 'reserved-type-kind.json', + 'reserved-type-list.json', + 'returns-alternate.json', + 'returns-array-bad.json', + 'returns-dict.json', + 'returns-unknown.json', + 'returns-whitelist.json', + 'string-code-point-31.json', + 'string-code-point-127.json', + 'struct-base-clash-deep.json', + 'struct-base-clash.json', + 'struct-data-invalid.json', + 'struct-member-if-invalid.json', + 'struct-member-invalid-dict.json', + 'struct-member-invalid.json', + 'trailing-comma-list.json', + 'trailing-comma-object.json', + 'type-bypass-bad-gen.json', + 'unclosed-list.json', + 'unclosed-object.json', + 'unclosed-string.json', + 'union-base-empty.json', + 'union-base-no-discriminator.json', + 'union-branch-case.json', + 'union-branch-if-invalid.json', + 'union-branch-invalid-dict.json', + 'union-clash-branches.json', + 'union-empty.json', + 'union-invalid-base.json', + 'union-optional-branch.json', + 'union-unknown.json', + 'unknown-escape.json', + 'unknown-expr-key.json', +] + +# Because people may want to use test-qapi.py from the command line, we +# are not using the "#! /usr/bin/env python3" trick here. See +# docs/devel/build-system.txt +test('QAPI schema regression tests', python, args: files('test-qapi.py', s= chemas), + env: test_env, suite: ['qapi-schema', 'qapi-frontend']) + +diff =3D find_program('diff') + +qapi_doc =3D custom_target('QAPI doc', + output: 'doc-good-qapi-doc.texi', + input: files('doc-good.json'), + command: [ qapi_gen, '-o', meson.current_build_di= r(), + '-p', 'doc-good-', '@INPUT0@' ], + depend_files: qapi_gen_depends) + +test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc], + depends: qapi_doc, + suite: ['qapi-schema', 'qapi-doc']) --=20 1.8.3.1