Commit e45eaef9 authored by Fam Zheng's avatar Fam Zheng
Browse files

Makefile: Let "make check-help" work without running ./configure



Currently if you do "make check-help" in a fresh checkout, only an error
is printed which is not nice:

    $ make check-help V=1
    cc -nostdlib  -o check-help.mo
    cc: fatal error: no input files
    compilation terminated.
    rules.mak:115: recipe for target 'check-help.mo' failed
    make: *** [check-help.mo] Error 1

Move the config-host.mak condition into the body of
tests/Makefile.include and always include the rule for check-help.

Reported-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Message-Id: <20170810085025.14076-1-famz@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
parent 83c3a1f6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -281,9 +281,7 @@ dummy := $(call unnest-vars,, \
                common-obj-m \
                trace-obj-y)

ifneq ($(wildcard config-host.mak),)
include $(SRC_PATH)/tests/Makefile.include
endif

all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules

+25 −21
Original line number Diff line number Diff line

.PHONY: check-help
check-help:
	@echo "Regression testing targets:"
	@echo
	@echo " make check                Run all tests"
	@echo " make check-qtest-TARGET   Run qtest tests for given target"
	@echo " make check-qtest          Run qtest tests"
	@echo " make check-unit           Run qobject tests"
	@echo " make check-speed          Run qobject speed tests"
	@echo " make check-qapi-schema    Run QAPI schema tests"
	@echo " make check-block          Run block tests"
	@echo " make check-report.html    Generates an HTML test report"
	@echo " make check-clean          Clean the tests"
	@echo
	@echo "Please note that HTML reports do not regenerate if the unit tests"
	@echo "has not changed."
	@echo
	@echo "The variable SPEED can be set to control the gtester speed setting."
	@echo "Default options are -k and (for make V=1) --verbose; they can be"
	@echo "changed with variable GTESTER_OPTIONS."

ifneq ($(wildcard config-host.mak),)
export SRC_PATH

qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
@@ -802,27 +825,6 @@ $(check-qtest-y): $(qtest-obj-y)

tests/test-qga: tests/test-qga.o $(qtest-obj-y)

.PHONY: check-help
check-help:
	@echo "Regression testing targets:"
	@echo
	@echo " make check                Run all tests"
	@echo " make check-qtest-TARGET   Run qtest tests for given target"
	@echo " make check-qtest          Run qtest tests"
	@echo " make check-unit           Run qobject tests"
	@echo " make check-speed          Run qobject speed tests"
	@echo " make check-qapi-schema    Run QAPI schema tests"
	@echo " make check-block          Run block tests"
	@echo " make check-report.html    Generates an HTML test report"
	@echo " make check-clean          Clean the tests"
	@echo
	@echo "Please note that HTML reports do not regenerate if the unit tests"
	@echo "has not changed."
	@echo
	@echo "The variable SPEED can be set to control the gtester speed setting."
	@echo "Default options are -k and (for make V=1) --verbose; they can be"
	@echo "changed with variable GTESTER_OPTIONS."

SPEED = quick
GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
GCOV_OPTIONS = -n $(if $(V),-f,)
@@ -917,3 +919,5 @@ all: $(QEMU_IOTESTS_HELPERS-y)

-include $(wildcard tests/*.d)
-include $(wildcard tests/libqos/*.d)

endif