[PATCH 00/15] tests/docker and tests/tcg cleanup and diet

Paolo Bonzini posted 15 patches 3 years, 8 months ago
Failed in applying to current master (apply log)
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
There is a newer version of this series
tests/Makefile.include                    |  63 +++++------
tests/docker/Makefile.include             |  89 ++++------------
tests/tcg/Makefile.prereqs                |  18 ----
tests/tcg/Makefile.qemu                   | 121 ----------------------
tests/tcg/Makefile.target                 |  11 +-
tests/tcg/aarch64/Makefile.softmmu-target |   2 +-
tests/tcg/aarch64/Makefile.target         |  10 +-
tests/tcg/configure.sh                    |  72 ++++++++-----
tests/tcg/i386/Makefile.target            |   2 +-
tests/tcg/multiarch/Makefile.target       |   2 +-
tests/tcg/ppc64/Makefile.target           |   4 +-
tests/tcg/ppc64le/Makefile.target         |   4 +-
tests/tcg/x86_64/Makefile.target          |   2 +-
13 files changed, 116 insertions(+), 284 deletions(-)
delete mode 100644 tests/tcg/Makefile.prereqs
delete mode 100644 tests/tcg/Makefile.qemu
[PATCH 00/15] tests/docker and tests/tcg cleanup and diet
Posted by Paolo Bonzini 3 years, 8 months ago
The first seven patches simplify and clean up a bit the
tests/docker/Makefile.include file.

The rest adjust tests/Makefile.include to invoke the tests/tcg
Makefiles directly, without going through Makefile.qemu and
Makefile.prereqs.  All information is gathered at configure time,
and the config*.mak files for each TCG test target includes
the normal Makefile variables (AC, CC, LD, etc.).

This is also a first step towards moving the cross-compilation
infrastructure from tests/tcg to all of QEMU, so that it can be
used to build firmware binaries.

Paolo

Paolo Bonzini (15):
  tests/docker: remove dead code
  tests/docker: remove test targets
  tests/docker: remove dead variable
  tests/docker: remove unnecessary default definitions
  tests/docker: inline variable definitions or move close to use
  tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES)
  tests/docker: simplify docker-TEST@IMAGE targets
  tests/tcg: add compiler tests when using containers
  tests/tcg: remove CONFIG_LINUX_USER from config-target.mak
  tests/tcg: remove CONFIG_USER_ONLY from config-target.mak
  tests/tcg: prepare Makefile.prereqs at configure time
  tests/tcg: list test targets in Makefile.prereqs
  tests/tcg: invoke Makefile.target directly from QEMU's makefile
  tests/docker: remove SKIP_DOCKER_BUILD
  tests/tcg: fix non-static build

 tests/Makefile.include                    |  63 +++++------
 tests/docker/Makefile.include             |  89 ++++------------
 tests/tcg/Makefile.prereqs                |  18 ----
 tests/tcg/Makefile.qemu                   | 121 ----------------------
 tests/tcg/Makefile.target                 |  11 +-
 tests/tcg/aarch64/Makefile.softmmu-target |   2 +-
 tests/tcg/aarch64/Makefile.target         |  10 +-
 tests/tcg/configure.sh                    |  72 ++++++++-----
 tests/tcg/i386/Makefile.target            |   2 +-
 tests/tcg/multiarch/Makefile.target       |   2 +-
 tests/tcg/ppc64/Makefile.target           |   4 +-
 tests/tcg/ppc64le/Makefile.target         |   4 +-
 tests/tcg/x86_64/Makefile.target          |   2 +-
 13 files changed, 116 insertions(+), 284 deletions(-)
 delete mode 100644 tests/tcg/Makefile.prereqs
 delete mode 100644 tests/tcg/Makefile.qemu

-- 
2.31.1
Re: [PATCH 00/15] tests/docker and tests/tcg cleanup and diet
Posted by Richard Henderson 3 years, 8 months ago
On 3/28/22 08:02, Paolo Bonzini wrote:
> This is also a first step towards moving the cross-compilation
> infrastructure from tests/tcg to all of QEMU, so that it can be
> used to build firmware binaries.

Yay!

However, the tricore special cases broke:

/home/rth/qemu/src/tests/docker/docker.py --engine auto build -t qemu/debian-tricore-cross 
-f /home/rth/qemu/src/tests/docker/dockerfiles/debian-tricore-cross.docker   --registry 
registry.gitlab.com/qemu-project/qemu --add-current-user
Image is up to date.
make -C tests/tcg/tricore-softmmu -f ../Makefile.target 
DOCKER_SCRIPT="/home/rth/qemu/src/tests/docker/docker.py --engine auto" 
TARGET="tricore-softmmu" SRC_PATH="/home/rth/qemu/src"
make[1]: Entering directory '/home/rth/qemu/bld/tests/tcg/tricore-softmmu'
cc -E -o test_abs.pS /home/rth/qemu/src/tests/tcg/tricore/test_abs.S
/home/rth/qemu/src/tests/docker/docker.py --engine auto cc --cc  -i 
qemu/debian-tricore-cross -s /home/rth/qemu/src --  -o test_abs.o test_abs.pS
usage: docker.py <subcommand> ... cc [-h] [--quiet] --image IMAGE [--cc CC] [--source-path 
[PATHS [PATHS ...]]]
docker.py <subcommand> ... cc: error: argument --cc: expected one argument
make[1]: *** [/home/rth/qemu/src/tests/tcg/tricore/Makefile.softmmu-target:23: test_abs.o] 
Error 2


r~
Re: [PATCH 00/15] tests/docker and tests/tcg cleanup and diet
Posted by Paolo Bonzini 3 years, 8 months ago
On 3/28/22 17:53, Richard Henderson wrote:
> 
>> This is also a first step towards moving the cross-compilation
>> infrastructure from tests/tcg to all of QEMU, so that it can be
>> used to build firmware binaries.
> 
> Yay!
> 
> However, the tricore special cases broke:
Silly pasto:

diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index f195d2d873..c0022b47a6 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -334,7 +334,7 @@ for target in $target_list; do
                echo "BUILD_STATIC=y" >> $config_target_mak
                echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" >> $config_target_mak
                if test -n "$container_cross_as"; then
-                  echo "AS=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --" >> $config_target_mak
+                  echo "AS=\$(DOCKER_SCRIPT) cc --cc $container_cross_as -i qemu/$container_image -s $source_path --" >> $config_target_mak
                fi
                if test -n "$container_cross_ld"; then
                    echo "LD=\$(DOCKER_SCRIPT) cc --cc $container_cross_ld -i qemu/$container_image -s $source_path --" >> $config_target_mak

Paolo