tests/tcg: remove -f from Makefile invocation
Instead of linking tests/tcg/Makefile.target into the build tree, name the symbolic link "Makefile" and create it in every target subdirectory. This makes it possible to just invoke "make" in tests/tcg subdirectories. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-21-alex.bennee@linaro.org>
This commit is contained in:
parent
a3e28f81fd
commit
d674342e2e
|
@ -2243,7 +2243,6 @@ fi
|
||||||
# tests might fail. Prefer to keep the relevant files in their own
|
# tests might fail. Prefer to keep the relevant files in their own
|
||||||
# directory and symlink the directory instead.
|
# directory and symlink the directory instead.
|
||||||
LINKS="Makefile"
|
LINKS="Makefile"
|
||||||
LINKS="$LINKS tests/tcg/Makefile.target"
|
|
||||||
LINKS="$LINKS pc-bios/optionrom/Makefile"
|
LINKS="$LINKS pc-bios/optionrom/Makefile"
|
||||||
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
|
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
|
||||||
LINKS="$LINKS pc-bios/vof/Makefile"
|
LINKS="$LINKS pc-bios/vof/Makefile"
|
||||||
|
@ -2457,6 +2456,7 @@ fi
|
||||||
echo "# Automatically generated by configure - do not modify" > $makefile
|
echo "# Automatically generated by configure - do not modify" > $makefile
|
||||||
|
|
||||||
config_host_mak=tests/tcg/config-host.mak
|
config_host_mak=tests/tcg/config-host.mak
|
||||||
|
mkdir -p tests/tcg
|
||||||
echo "# Automatically generated by configure - do not modify" > $config_host_mak
|
echo "# Automatically generated by configure - do not modify" > $config_host_mak
|
||||||
echo "SRC_PATH=$source_path" >> $config_host_mak
|
echo "SRC_PATH=$source_path" >> $config_host_mak
|
||||||
echo "HOST_CC=$host_cc" >> $config_host_mak
|
echo "HOST_CC=$host_cc" >> $config_host_mak
|
||||||
|
@ -2560,8 +2560,9 @@ for target in $target_list; do
|
||||||
got_cross_cc=yes
|
got_cross_cc=yes
|
||||||
fi
|
fi
|
||||||
if test $got_cross_cc = yes; then
|
if test $got_cross_cc = yes; then
|
||||||
mkdir -p tests/tcg/$target
|
mkdir -p "tests/tcg/$target"
|
||||||
ln -sf ../config-$target.mak tests/tcg/$target/config-target.mak
|
ln -sf "$source_path/tests/tcg/Makefile.target" "tests/tcg/$target/Makefile"
|
||||||
|
ln -sf "../config-$target.mak" "tests/tcg/$target/config-target.mak"
|
||||||
echo "TARGET=$target" >> "$config_target_mak"
|
echo "TARGET=$target" >> "$config_target_mak"
|
||||||
echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
|
echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
|
||||||
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
|
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
|
||||||
|
|
|
@ -50,20 +50,19 @@ $(foreach TARGET,$(TCG_TESTS_TARGETS), \
|
||||||
.PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
|
.PHONY: $(TCG_TESTS_TARGETS:%=build-tcg-tests-%)
|
||||||
$(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/tcg/config-%.mak
|
$(TCG_TESTS_TARGETS:%=build-tcg-tests-%): build-tcg-tests-%: $(BUILD_DIR)/tests/tcg/config-%.mak
|
||||||
$(call quiet-command, \
|
$(call quiet-command, \
|
||||||
$(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS), \
|
$(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS), \
|
||||||
"BUILD","$* guest-tests")
|
"BUILD","$* guest-tests")
|
||||||
|
|
||||||
.PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%)
|
.PHONY: $(TCG_TESTS_TARGETS:%=run-tcg-tests-%)
|
||||||
$(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-%
|
$(TCG_TESTS_TARGETS:%=run-tcg-tests-%): run-tcg-tests-%: build-tcg-tests-%
|
||||||
$(call quiet-command, \
|
$(call quiet-command, \
|
||||||
$(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) \
|
$(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) SPEED=$(SPEED) run, \
|
||||||
SPEED=$(SPEED) run, \
|
|
||||||
"RUN", "$* guest-tests")
|
"RUN", "$* guest-tests")
|
||||||
|
|
||||||
.PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%)
|
.PHONY: $(TCG_TESTS_TARGETS:%=clean-tcg-tests-%)
|
||||||
$(TCG_TESTS_TARGETS:%=clean-tcg-tests-%): clean-tcg-tests-%:
|
$(TCG_TESTS_TARGETS:%=clean-tcg-tests-%): clean-tcg-tests-%:
|
||||||
$(call quiet-command, \
|
$(call quiet-command, \
|
||||||
$(MAKE) -C tests/tcg/$* -f ../Makefile.target $(SUBDIR_MAKEFLAGS) clean, \
|
$(MAKE) -C tests/tcg/$* $(SUBDIR_MAKEFLAGS) clean, \
|
||||||
"CLEAN", "$* guest-tests")
|
"CLEAN", "$* guest-tests")
|
||||||
|
|
||||||
.PHONY: build-tcg
|
.PHONY: build-tcg
|
||||||
|
|
Loading…
Reference in New Issue