qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] tests/tcg: move configuration to a sub-shell script
Date: Wed, 7 Aug 2019 15:26:12 +0200	[thread overview]
Message-ID: <8b9e239c-a047-1d76-04ad-3304ff44b7a0@redhat.com> (raw)
In-Reply-To: <87lfw5i0j1.fsf@linaro.org>

On 07/08/19 15:10, Alex Bennée wrote:
>> -DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
>> +DIRS="tests tests/tcg tests/tcg/lm32 tests/libqos tests/qapi-schema tests/qemu-iotests tests/vm"
>>  DIRS="$DIRS tests/fp tests/qgraph"
>>  DIRS="$DIRS docs docs/interop fsdev scsi"
>>  DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
>>  DIRS="$DIRS roms/seabios roms/vgabios"
>> -LINKS="Makefile tests/tcg/Makefile"
>> -LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>> -LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
>> -LINKS="$LINKS tests/fp/Makefile"
>> +LINKS="Makefile"
>> +LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
>> +LINKS="$LINKS tests/tcg/Makefile.target tests/fp/Makefile"
> 
> Is this why I get complaints on a clean tree:
> 
>   libpmem support   no
>   libudev           yes
>   default devices   yes
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 179: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 180: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 183: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 184: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 193: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 213: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-aarch64-linux-user.mak: Directory nonexistent
>   /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: 179: /home/alex/lsrc/qemu.git/tests/tcg/configure.sh: cannot create tests/tcg/config-arm-linux-user.mak: Directory nonexist

configure.sh is invoked too early.

> 
> 
>>  LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
>>  LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
>>  LINKS="$LINKS pc-bios/s390-ccw/Makefile"
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index 8bb5c97..a3ee649 100644
>> --- a/tests/Makefile.include
>> +++ b/tests/Makefile.include
>> @@ -1058,30 +1058,28 @@ BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
>>  CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
>>  RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
>>
>> -ifeq ($(HAVE_USER_DOCKER),y)
>>  # Probe for the Docker Builds needed for each build
>>  $(foreach PROBE_TARGET,$(TARGET_DIRS), 				\
>>  	$(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
>> -endif
>>
>>  build-tcg-tests-%:
>>  	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
>>  		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
>>  		SRC_PATH=$(SRC_PATH) \
>> -	       	V="$(V)" TARGET_DIR="$*/" guest-tests, \
>> +	       	V="$(V)" TARGET="$*" guest-tests, \
>>  		"BUILD", "TCG tests for $*")
>>
>>  run-tcg-tests-%: build-tcg-tests-% %/all
>>  	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
>>  		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
>>  		SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \
>> -		V="$(V)" TARGET_DIR="$*/" run-guest-tests, \
>> +		V="$(V)" TARGET="$*" run-guest-tests, \
>>  		"RUN", "TCG tests for $*")
>>
>>  clean-tcg-tests-%:
>>  	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
>>  		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
>> -		SRC_PATH=$(SRC_PATH) TARGET_DIR="$*/" clean-guest-tests, \
>> +		SRC_PATH=$(SRC_PATH) TARGET="$*" clean-guest-tests, \
>>  		"RUN", "TCG tests for $*")
>>
>>  .PHONY: build-tcg
>> diff --git a/tests/tcg/Makefile.prereqs b/tests/tcg/Makefile.prereqs
>> index 53b0196..7494b31 100644
>> --- a/tests/tcg/Makefile.prereqs
>> +++ b/tests/tcg/Makefile.prereqs
>> @@ -7,24 +7,12 @@
>>  # selection of required docker targets before we invoke a sub-make for
>>  # each target.
>>
>> -# First we need the target makefile which tells us the target architecture
>> -CROSS_CC_GUEST:=
>> --include $(BUILD_DIR)/$(PROBE_TARGET)/config-target.mak
>> -
>> -# Then we load up the target architecture makefiles which tell us
>> -# about the compilers
>>  DOCKER_IMAGE:=
>>
>> --include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
>> --include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
>> +-include $(BUILD_DIR)/tests/tcg/config-$(PROBE_TARGET).mak
>>
>> -ifndef CROSS_CC_GUEST
>>  ifneq ($(DOCKER_IMAGE),)
>>  build-tcg-tests-$(PROBE_TARGET): docker-image-$(DOCKER_IMAGE)
>> +$(BUILD_DIR)/tests/tcg/config_$(PROBE_TARGET).mak: config-host.mak
>> +config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh
>>  endif
>> -endif
>> -
>> -# Clean-up
>> -# undefine TARGET_NAME
>> -# undefine TARGET_BASE_ARCH
>> -# undefine TARGET_ABI_DIR
>> diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu
>> index d3f3437..c8bec7b 100644
>> --- a/tests/tcg/Makefile.qemu
>> +++ b/tests/tcg/Makefile.qemu
>> @@ -8,17 +8,22 @@
>>  # to do it for us.
>>  #
>>
>> -# The per ARCH makefile, if it exists, holds extra information about
>> +include $(SRC_PATH)/rules.mak
>> +
>> +# The configure script fills in extra information about
>>  # useful docker images or alternative compiler flags.
>>
>> -include $(TARGET_DIR)config-target.mak
>> -include $(SRC_PATH)/rules.mak
>> -include $(wildcard \
>> -	$(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include \
>> -	$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include)
>> +CROSS_CC_GUEST:=
>> +DOCKER_IMAGE:=
>> +-include $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak
>>
>>  GUEST_BUILD=
>>  TCG_MAKE=../Makefile.target
>> +
>> +# We also need the Docker make rules to depend on
>> +SKIP_DOCKER_BUILD=1
>> +include $(SRC_PATH)/tests/docker/Makefile.include
>> +
>>  # Support installed Cross Compilers
>>
>>  ifdef CROSS_CC_GUEST
>> @@ -26,11 +31,11 @@ ifdef CROSS_CC_GUEST
>>  .PHONY: cross-build-guest-tests
>>  cross-build-guest-tests:
>>  	$(call quiet-command, \
>> -	   (mkdir -p tests/tcg/$(TARGET_DIR) && cd tests/tcg/$(TARGET_DIR) && \
>> -	    $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" CC="$(CROSS_CC_GUEST)" \
>> +	   (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \
>> +	    $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \
>>  			SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
>> -			EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
> 
> I expect given we need config-FOO.mak files before that these mkdir's are in the wrong place.

These are mkdirs for tests/tcg/FOO, but I do need to add mkdir -p
tests/tcg to the configure.sh script.

Paolo


  reply	other threads:[~2019-08-07 13:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 12:37 [Qemu-devel] [PATCH 0/3] tests/tcg: disentangle makefiles Paolo Bonzini
2019-07-30 12:37 ` [Qemu-devel] [PATCH 1/3] tests/tcg: use EXTRA_CFLAGS everywhere Paolo Bonzini
2019-08-07 12:51   ` Alex Bennée
2019-08-07 13:10     ` Paolo Bonzini
2019-07-30 12:37 ` [Qemu-devel] [PATCH 2/3] tests/tcg: cleanup Makefile inclusions Paolo Bonzini
2019-07-30 12:44   ` Philippe Mathieu-Daudé
2019-07-30 13:21     ` Paolo Bonzini
2019-08-07 13:05   ` Alex Bennée
2019-08-07 13:11     ` Paolo Bonzini
2019-07-30 12:37 ` [Qemu-devel] [PATCH 3/3] tests/tcg: move configuration to a sub-shell script Paolo Bonzini
2019-08-07 12:42   ` Alex Bennée
2019-08-07 13:10   ` Alex Bennée
2019-08-07 13:26     ` Paolo Bonzini [this message]
2019-07-30 12:53 ` [Qemu-devel] [PATCH 0/3] tests/tcg: disentangle makefiles no-reply
2019-08-07 12:40 ` Alex Bennée
2019-08-07 13:06   ` Paolo Bonzini
2019-08-07 13:33     ` Eric Blake
2019-08-07 14:30       ` Paolo Bonzini
2019-08-07 16:38         ` Alex Bennée
2019-08-07 16:58           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b9e239c-a047-1d76-04ad-3304ff44b7a0@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).