qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] tests/tcg: move configuration to a sub-shel


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]