mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-31 02:48:31 +00:00
Move qtest invocation into rules.mk
This commit is contained in:
parent
ae0399ef87
commit
a3f872020d
14
Makefile
14
Makefile
@ -79,7 +79,7 @@ TEST_TARGETS = $(foreach B,$(TEST_ITEMS),check_$(B))
|
||||
|
||||
CLEAN_TARGETS = $(foreach B,$(BUILD_ITEMS),clean_$(B))
|
||||
|
||||
# For test suitse
|
||||
# For test suites
|
||||
export QPDF_BIN = $(abspath qpdf/$(OUTPUT_DIR)/qpdf)
|
||||
export QPDF_SKIP_TEST_COMPARE_IMAGES
|
||||
export QPDF_LARGE_FILE_TEST_PATH
|
||||
@ -128,14 +128,4 @@ check: $(TEST_TARGETS)
|
||||
|
||||
QTEST=$(abspath qtest/bin/qtest-driver)
|
||||
$(TEST_TARGETS):
|
||||
@echo running qtest-driver for $(subst check_,,$@)
|
||||
@(cd $(subst check_,,$@)/$(OUTPUT_DIR); \
|
||||
if TC_SRCS="$(foreach T,$(TC_SRCS_$(subst check_,,$@)),../../$(T))" \
|
||||
$(QTEST) -bindirs .:.. -datadir ../qtest -covdir ..; then \
|
||||
true; \
|
||||
else \
|
||||
if test "$(SHOW_FAILED_TEST_OUTPUT)" = "1"; then \
|
||||
cat -v qtest.log; \
|
||||
fi; \
|
||||
false; \
|
||||
fi)
|
||||
$(call run_qtest,$(subst check_,,$@))
|
||||
|
@ -47,3 +47,18 @@ depflags=-MD -MF $(1).dep -MP
|
||||
else
|
||||
depflags=
|
||||
endif
|
||||
|
||||
# Usage: $(call run_qtest,dir)
|
||||
define run_qtest
|
||||
@echo running qtest-driver for $(1)
|
||||
@(cd $(1)/$(OUTPUT_DIR); \
|
||||
if TC_SRCS="$(foreach T,$(TC_SRCS_$(1)),../../$(T))" \
|
||||
$(QTEST) -bindirs .:.. -datadir ../qtest -covdir ..; then \
|
||||
true; \
|
||||
else \
|
||||
if test "$(SHOW_FAILED_TEST_OUTPUT)" = "1"; then \
|
||||
cat -v qtest.log; \
|
||||
fi; \
|
||||
false; \
|
||||
fi)
|
||||
endef
|
||||
|
Loading…
x
Reference in New Issue
Block a user