Don't build tests with default "make" command.
Require explicit command to build tests because not everybody interested
in running unit tests.
Following changes done in make rules:
"make test-build" <--- Added
"make test" <--- Updated functionality (build + run basic tests)
Now "make test" builds all tests and runs unit test (test).
Thanks to dependency resolving, it is possible to call "make test"
directly after config, "make test" will compile dependent components
(lib and drivers, but not apps).
And a new "make test-build" make rule added which will build
tests but not run unit test. "make test-build" has same dependency
resolving features with "make test"
To include "test" folder into makesystem, existing ROOTDIRS- variable
is used instead of hardcoding folder name into makefiles, current usage
of ROOTDIRS* variables are:
ROOTDIRS-y <-- root level folders prepared and compiled by default
ROOTDIRS- <-- root level folders prepared but not compiled by default
The preparation is required for dependency resolving and cleaning.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
# directory list
#
-ROOTDIRS-y := buildtools lib drivers app test
+ROOTDIRS-y := buildtools lib drivers app
+ROOTDIRS- := test
include $(RTE_SDK)/mk/rte.sdkroot.mk
$(1): $(sort $(LOCAL_DEPDIRS-$(1)))
endef
-$(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
+$(foreach d,$(ROOTDIRS-y) $(ROOTDIRS-),$(eval $(call depdirs_rule,$(d))))
drivers: | buildtools
#
$(Q)$(MAKE) -f $(RTE_SDK)/GNUmakefile gcovclean
@echo Clean complete
+.PHONY: test-build
+test-build: test
+
.SECONDEXPANSION:
-.PHONY: $(ROOTDIRS-y)
-$(ROOTDIRS-y):
+.PHONY: $(ROOTDIRS-y) $(ROOTDIRS-)
+$(ROOTDIRS-y) $(ROOTDIRS-):
@[ -d $(BUILDDIR)/$@ ] || mkdir -p $(BUILDDIR)/$@
@echo "== Build $@"
$(Q)$(MAKE) S=$@ -f $(RTE_SRCDIR)/$@/Makefile -C $(BUILDDIR)/$@ all
$(error "need a make config first")
endif
-DEPDIR_FILES = $(addsuffix /.depdirs, $(addprefix $(BUILDDIR)/,$(ROOTDIRS-y)))
+DEPDIR_FILES = $(addsuffix /.depdirs, $(addprefix $(BUILDDIR)/,$(ROOTDIRS-y) $(ROOTDIRS-)))
.PHONY: depdirs
depdirs: $(RTE_OUTPUT)/.depdirs
test fast_test ring_test mempool_test perf_test coverage:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@
+.PHONY: test-buid
+test: test-build
+
.PHONY: install
install:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install