mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
Python queue, 2018-02-05
-----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJaeOPNAAoJECgHk2+YTcWmW18QAIYVEuiOGgQY6iBcdYWe5Gaq u+XUogPN/eNVYXGuxPY/kKQ7xcnYGPgGpDVSg27mW4OGdyA10upaW+jWxRCHcPoK 6kuLqCucFc7ptuwDZAeF8AFTvK3jhraNPBh6ApFjhTODr0X+ymGkCe+ELgVEGSTD 7S5VOnw6BfR5zhp6HVgRma4H0SG5vhseXiDIJxEydoYp7DemFtFts3WDtj9f7VRm 0Dac4/NWSWGIJpaS+zMrS3OvtswI9D66nC5tRHCVFOUEEj/likGyjFuPWa/eyGYz vtZyn0v+b2IcQxTPAMIlFkxqEXsKdlf4A4KCs0Wf0pIWU0qSAen7xffXaW6FGAWB uOClOY4+302sArBjtqfOAQP3TlRC+bonABkV6bJx9bObesfx9zQH/9fRgkLfVFHb /sSiDhwqRRJ43B1/1VhG7Fj152+qYWDWBZ1WnyEHXObAKGEkmlAiMVeZmBiNr9w6 YTDCuOiZ9Rsv1IQRClCEUzDUyZ7XGpBpjJMCyUaW1PQFgu0j1cvaZLoG3MUuatKC PBGRW2beTQBlhJ1zzk2+uxWJ438P7fcxbsc8nf3wWQlKEixwsiQ3JT1cLBkvDwfX /ob+Sk1f/kVdjUI5z/Ydm5bfb1nAQBNdQges1xDfLuou3f8gS95qUu+De8BV6erA 9c1/g8yZeokDs9gw5/IH =wKYf -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging Python queue, 2018-02-05 # gpg: Signature made Mon 05 Feb 2018 23:07:57 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: (21 commits) docker: change Fedora images to run with python3 travis: improve python version test coverage ui: update keycodemapdb to get py3 fixes input: add missing JIS keys to virtio input qemu.py: don't launch again before shutdown() qemu.py: cleanup redundant calls in launch() qemu.py: use poll() instead of 'returncode' qemu.py: always cleanup on shutdown() qemu.py: refactor launch() qemu.py: better control of created files qemu.py: remove unused import configure: allow use of python 3 scripts: ensure signrom treats data as bytes qapi: force a UTF-8 locale for running Python qapi: ensure stable sort ordering when checking QAPI entities qapi: remove '-q' arg to diff when comparing QAPI output qapi: Adapt to moved location of 'maketrans' function in py3 qapi: adapt to moved location of StringIO module in py3 qapi: Use OrderedDict from standard library if available qapi: use items()/values() intead of iteritems()/itervalues() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
bc2943d6ca
12 changed files with 151 additions and 101 deletions
|
@ -919,10 +919,10 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
|
|||
$^ >$*.test.out 2>$*.test.err; \
|
||||
echo $$? >$*.test.exit, \
|
||||
"TEST","$*.out")
|
||||
@diff -q $(SRC_PATH)/$*.out $*.test.out
|
||||
@diff $(SRC_PATH)/$*.out $*.test.out
|
||||
@# Sanitize error messages (make them independent of build directory)
|
||||
@perl -p -e 's|\Q$(SRC_PATH)\E/||g' $*.test.err | diff -q $(SRC_PATH)/$*.err -
|
||||
@diff -q $(SRC_PATH)/$*.exit $*.test.exit
|
||||
@perl -p -e 's|\Q$(SRC_PATH)\E/||g' $*.test.err | diff $(SRC_PATH)/$*.err -
|
||||
@diff $(SRC_PATH)/$*.exit $*.test.exit
|
||||
|
||||
.PHONY: check-tests/qapi-schema/doc-good.texi
|
||||
check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM fedora:latest
|
||||
ENV PACKAGES \
|
||||
ccache gettext git tar PyYAML sparse flex bison python2 bzip2 hostname \
|
||||
ccache gettext git tar PyYAML sparse flex bison python3 bzip2 hostname \
|
||||
glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
|
||||
gcc gcc-c++ clang make perl which bc findutils libaio-devel \
|
||||
nettle-devel libasan libubsan \
|
||||
|
@ -12,6 +12,7 @@ ENV PACKAGES \
|
|||
mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
|
||||
mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
|
||||
mingw64-bzip2
|
||||
ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
|
||||
|
||||
RUN dnf install -y $PACKAGES
|
||||
RUN rpm -q $PACKAGES | sort > /packages.txt
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# See the COPYING file in the top-level directory.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
from qapi import *
|
||||
from pprint import pprint
|
||||
import os
|
||||
|
@ -18,51 +19,51 @@ import sys
|
|||
|
||||
class QAPISchemaTestVisitor(QAPISchemaVisitor):
|
||||
def visit_enum_type(self, name, info, values, prefix):
|
||||
print 'enum %s %s' % (name, values)
|
||||
print('enum %s %s' % (name, values))
|
||||
if prefix:
|
||||
print ' prefix %s' % prefix
|
||||
print(' prefix %s' % prefix)
|
||||
|
||||
def visit_object_type(self, name, info, base, members, variants):
|
||||
print 'object %s' % name
|
||||
print('object %s' % name)
|
||||
if base:
|
||||
print ' base %s' % base.name
|
||||
print(' base %s' % base.name)
|
||||
for m in members:
|
||||
print ' member %s: %s optional=%s' % \
|
||||
(m.name, m.type.name, m.optional)
|
||||
print(' member %s: %s optional=%s' % \
|
||||
(m.name, m.type.name, m.optional))
|
||||
self._print_variants(variants)
|
||||
|
||||
def visit_alternate_type(self, name, info, variants):
|
||||
print 'alternate %s' % name
|
||||
print('alternate %s' % name)
|
||||
self._print_variants(variants)
|
||||
|
||||
def visit_command(self, name, info, arg_type, ret_type,
|
||||
gen, success_response, boxed):
|
||||
print 'command %s %s -> %s' % \
|
||||
(name, arg_type and arg_type.name, ret_type and ret_type.name)
|
||||
print ' gen=%s success_response=%s boxed=%s' % \
|
||||
(gen, success_response, boxed)
|
||||
print('command %s %s -> %s' % \
|
||||
(name, arg_type and arg_type.name, ret_type and ret_type.name))
|
||||
print(' gen=%s success_response=%s boxed=%s' % \
|
||||
(gen, success_response, boxed))
|
||||
|
||||
def visit_event(self, name, info, arg_type, boxed):
|
||||
print 'event %s %s' % (name, arg_type and arg_type.name)
|
||||
print ' boxed=%s' % boxed
|
||||
print('event %s %s' % (name, arg_type and arg_type.name))
|
||||
print(' boxed=%s' % boxed)
|
||||
|
||||
@staticmethod
|
||||
def _print_variants(variants):
|
||||
if variants:
|
||||
print ' tag %s' % variants.tag_member.name
|
||||
print(' tag %s' % variants.tag_member.name)
|
||||
for v in variants.variants:
|
||||
print ' case %s: %s' % (v.name, v.type.name)
|
||||
print(' case %s: %s' % (v.name, v.type.name))
|
||||
|
||||
schema = QAPISchema(sys.argv[1])
|
||||
schema.visit(QAPISchemaTestVisitor())
|
||||
|
||||
for doc in schema.docs:
|
||||
if doc.symbol:
|
||||
print 'doc symbol=%s' % doc.symbol
|
||||
print('doc symbol=%s' % doc.symbol)
|
||||
else:
|
||||
print 'doc freeform'
|
||||
print ' body=\n%s' % doc.body.text
|
||||
for arg, section in doc.args.iteritems():
|
||||
print ' arg=%s\n%s' % (arg, section.text)
|
||||
print('doc freeform')
|
||||
print(' body=\n%s' % doc.body.text)
|
||||
for arg, section in doc.args.items():
|
||||
print(' arg=%s\n%s' % (arg, section.text))
|
||||
for section in doc.sections:
|
||||
print ' section=%s\n%s' % (section.name, section.text)
|
||||
print(' section=%s\n%s' % (section.name, section.text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue