Skip to content

Commit

Permalink
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Browse files Browse the repository at this point in the history
* separate accepted and auto-installed versions of Python dependencies
* bump tricore container to Debian 11
* small configure cleanups

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmTsZ14UHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMlVQf+Juomqo/luBwWwwguEZp32s+c+CYI
# HZJJJSIycq/VY2OsT9e+H1eMJYsCsdzJxn1NcnmEIUSMRkIuCxV5F62gaMl6BjgF
# tH8v4y1ZBDc0i0zw6qkuZM4sydNkK1XohGeOp8NkTE7F2fX0DT2AO17rSKIHh77R
# enNE5yq+s0YGHfYz7PbNvT1G+YXqt9SEEfCqIHkCQccjgFx9PEJu7PPuWdIYLG5s
# VVIyrbZzcX7OmQCCWdEZCe5t8swbOHtzE5D3JUVvfnUDj3BONXQybp/14rEikrjU
# fuy9sf3qW4XlwzPOUWFlPfxJIg8KWB1fL2wIppDn2gKrBB7fekwz5hlJRA==
# =lZmw
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 28 Aug 2023 05:22:38 EDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  configure: remove unnecessary mkdir -p
  configure: fix container_hosts misspellings and duplications
  target/i386: add support for VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE
  tests/docker: add python3-tomli dependency to containers
  Revert "tests: Use separate virtual environment for avocado"
  configure: switch to ensuregroup
  python: use vendored tomli
  configure: never use PyPI for Meson
  lcitool: bump libvirt-ci submodule and regenerate
  python: mkvenv: add ensuregroup command
  python: mkvenv: introduce TOML-like representation of dependencies
  python: mkvenv: tweak the matching of --diagnose to depspecs
  dockerfiles: bump tricore cross compiler container to Debian 11
  configure: fix and complete detection of tricore tools

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
stefanhaRH committed Aug 28, 2023
2 parents 98bdf24 + 29a8238 commit eaf760a
Show file tree
Hide file tree
Showing 43 changed files with 377 additions and 112 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.d/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ crash-test-debian:
script:
- cd build
- make NINJA=":" check-venv
- tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386
- pyvenv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386

build-system-fedora:
extends:
Expand Down Expand Up @@ -146,8 +146,8 @@ crash-test-fedora:
script:
- cd build
- make NINJA=":" check-venv
- tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
- tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
- pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
- pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32

build-system-centos:
extends:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.d/cirrus/freebsd-13.vars
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8'
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson mtools ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-tomli py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 xorriso zstd'
PYPI_PKGS=''
PYTHON='/usr/local/bin/python3'
2 changes: 1 addition & 1 deletion .gitlab-ci.d/cirrus/macos-12.vars
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ NINJA='/opt/homebrew/bin/ninja'
PACKAGING_COMMAND='brew'
PIP3='/opt/homebrew/bin/pip3'
PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson mtools ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol tesseract usbredir vde vte3 xorriso zlib zstd'
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme'
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme tomli'
PYTHON='/opt/homebrew/bin/python3'
31 changes: 10 additions & 21 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1018,19 +1018,14 @@ fi
python="$python -B"
mkvenv="$python ${source_path}/python/scripts/mkvenv.py"

mkvenv_flags=""
if test "$download" = "enabled" ; then
mkvenv_flags="--online"
fi
# Finish preparing the virtual environment using vendored .whl files

if ! $mkvenv ensure \
$mkvenv_flags \
--dir "${source_path}/python/wheels" \
--diagnose "meson" \
"meson>=0.63.0" ;
then
exit 1
if $python -c 'import sys; sys.exit(sys.version_info >= (3,11))'; then
$mkvenv ensure --dir "${source_path}/python/wheels" \
'tomli>=1.2.0' || exit 1
fi
$mkvenv ensuregroup --dir "${source_path}/python/wheels" \
${source_path}/pythondeps.toml meson || exit 1

# At this point, we expect Meson to be installed and available.
# We expect mkvenv or pip to have created pyvenv/bin/meson for us.
Expand All @@ -1047,10 +1042,9 @@ if test "$download" = "enabled" -a "$docs" = "enabled" ; then
fi

if test "$docs" != "disabled" ; then
if ! $mkvenv ensure \
if ! $mkvenv ensuregroup \
$mkvenv_flags \
--diagnose "sphinx-build" \
"sphinx>=1.6.0" "sphinx-rtd-theme>=0.5.0";
${source_path}/pythondeps.toml docs;
then
if test "$docs" = "enabled" ; then
exit 1
Expand Down Expand Up @@ -1271,6 +1265,7 @@ fi
: ${cross_prefix_sh4="sh4-linux-gnu-"}
: ${cross_prefix_sparc64="sparc64-linux-gnu-"}
: ${cross_prefix_sparc="$cross_prefix_sparc64"}
: ${cross_prefix_tricore="tricore-"}
: ${cross_prefix_x86_64="x86_64-linux-gnu-"}

: ${cross_cc_aarch64_be="$cross_cc_aarch64"}
Expand Down Expand Up @@ -1357,7 +1352,7 @@ probe_target_compiler() {
sh4) container_hosts=x86_64 ;;
sparc64) container_hosts=x86_64 ;;
tricore) container_hosts=x86_64 ;;
x86_64) container_hosts="aarch64 ppc64el x86_64" ;;
x86_64) container_hosts="aarch64 ppc64le x86_64" ;;
xtensa*) container_hosts=x86_64 ;;
esac

Expand Down Expand Up @@ -1458,17 +1453,12 @@ probe_target_compiler() {
tricore)
container_image=debian-tricore-cross
container_cross_prefix=tricore-
container_cross_as=tricore-as
container_cross_ld=tricore-ld
container_cross_cc=tricore-gcc
break
;;
x86_64)
container_image=debian-amd64-cross
container_cross_prefix=x86_64-linux-gnu-
;;
xtensa*)
container_hosts=x86_64
container_image=debian-xtensa-cross

# default to the dc232b cpu
Expand Down Expand Up @@ -1785,7 +1775,6 @@ fi
for target in $target_list; do
target_dir="$target"
target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
mkdir -p "$target_dir"
case $target in
*-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;;
*) symlink "../qemu-system-$target_name" "$target_dir/qemu-system-$target_name" ;;
Expand Down
6 changes: 3 additions & 3 deletions docs/devel/acpi-bits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ Under ``tests/avocado/`` as the root we have:
::

$ make check-venv (needed only the first time to create the venv)
$ ./tests/venv/bin/avocado run -t acpi tests/avocado
$ ./pyvenv/bin/avocado run -t acpi tests/avocado

The above will run all acpi avocado tests including this one.
In order to run the individual tests, perform the following:
::

$ ./tests/venv/bin/avocado run tests/avocado/acpi-bits.py --tap -
$ ./pyvenv/bin/avocado run tests/avocado/acpi-bits.py --tap -

The above will produce output in tap format. You can omit "--tap -" in the
end and it will produce output like the following:
::

$ ./tests/venv/bin/avocado run tests/avocado/acpi-bits.py
$ ./pyvenv/bin/avocado run tests/avocado/acpi-bits.py
Fetching asset from tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits
JOB ID : eab225724da7b64c012c65705dc2fa14ab1defef
JOB LOG : /home/anisinha/avocado/job-results/job-2022-10-10T17.58-eab2257/job.log
Expand Down
14 changes: 7 additions & 7 deletions docs/devel/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,9 @@ You can run the avocado tests simply by executing:
make check-avocado
This involves the automatic creation of Python virtual environment
within the build tree (at ``tests/venv``) which will have all the
right dependencies, and will save tests results also within the
This involves the automatic installation, from PyPI, of all the
necessary avocado-framework dependencies into the QEMU venv within the
build tree (at ``./pyvenv``). Test results are also saved within the
build tree (at ``tests/results``).

Note: the build environment must be using a Python 3 stack, and have
Expand Down Expand Up @@ -953,7 +953,7 @@ may be invoked by running:

.. code::
tests/venv/bin/avocado run $OPTION1 $OPTION2 tests/avocado/
pyvenv/bin/avocado run $OPTION1 $OPTION2 tests/avocado/
Note that if ``make check-avocado`` was not executed before, it is
possible to create the Python virtual environment with the dependencies
Expand All @@ -968,20 +968,20 @@ a test file. To run tests from a single file within the build tree, use:

.. code::
tests/venv/bin/avocado run tests/avocado/$TESTFILE
pyvenv/bin/avocado run tests/avocado/$TESTFILE
To run a single test within a test file, use:

.. code::
tests/venv/bin/avocado run tests/avocado/$TESTFILE:$TESTCLASS.$TESTNAME
pyvenv/bin/avocado run tests/avocado/$TESTFILE:$TESTCLASS.$TESTNAME
Valid test names are visible in the output from any previous execution
of Avocado or ``make check-avocado``, and can also be queried using:

.. code::
tests/venv/bin/avocado list tests/avocado
pyvenv/bin/avocado list tests/avocado
Manual Installation
~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit eaf760a

Please sign in to comment.