DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	John McNamara <john.mcnamara@intel.com>,
	Keith Wiles <keith.wiles@intel.com>
Subject: [dpdk-dev] [PATCH 2/4] mk: do not build tests by default
Date: Wed, 15 Feb 2017 15:26:30 +0000	[thread overview]
Message-ID: <20170215152632.25081-2-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20170215152632.25081-1-ferruh.yigit@intel.com>

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)

Now "make test" builds all tests and runs unit test (test).

Because of 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"

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 GNUmakefile          | 2 +-
 mk/rte.sdkbuild.mk   | 6 +++---
 mk/rte.sdkdepdirs.mk | 2 +-
 mk/rte.sdkroot.mk    | 7 +++++++
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index b1a5b76..00fe0db 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -40,6 +40,6 @@ export RTE_SDK
 # directory list
 #
 
-ROOTDIRS-y := buildtools lib drivers app test
+ROOTDIRS-y := buildtools lib drivers app
 
 include $(RTE_SDK)/mk/rte.sdkroot.mk
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index db6b983..21e0a47 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -48,7 +48,7 @@ define depdirs_rule
 $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
 endef
 
-$(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
+$(foreach d,$(ROOTDIRS-y) test,$(eval $(call depdirs_rule,$(d))))
 drivers: | buildtools
 
 #
@@ -73,8 +73,8 @@ clean: $(CLEANDIRS)
 	@echo Clean complete
 
 .SECONDEXPANSION:
-.PHONY: $(ROOTDIRS-y)
-$(ROOTDIRS-y):
+.PHONY: $(ROOTDIRS-y) test
+$(ROOTDIRS-y) test:
 	@[ -d $(BUILDDIR)/$@ ] || mkdir -p $(BUILDDIR)/$@
 	@echo "== Build $@"
 	$(Q)$(MAKE) S=$@ -f $(RTE_SRCDIR)/$@/Makefile -C $(BUILDDIR)/$@ all
diff --git a/mk/rte.sdkdepdirs.mk b/mk/rte.sdkdepdirs.mk
index 38fd863..f82db69 100644
--- a/mk/rte.sdkdepdirs.mk
+++ b/mk/rte.sdkdepdirs.mk
@@ -36,7 +36,7 @@ ifeq (,$(wildcard $(RTE_OUTPUT)/Makefile))
   $(error "need a make config first")
 endif
 
-DEPDIR_FILES = $(addsuffix /.depdirs, $(addprefix $(BUILDDIR)/,$(ROOTDIRS-y)))
+DEPDIR_FILES = $(addsuffix /.depdirs, $(addprefix $(BUILDDIR)/,$(ROOTDIRS-y) test))
 
 .PHONY: depdirs
 depdirs: $(RTE_OUTPUT)/.depdirs
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index 04ad523..9c23987 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -96,6 +96,13 @@ config showconfigs showversion showversionum:
 test fast_test ring_test mempool_test perf_test coverage:
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@
 
+test: test-build
+
+.PHONY: test-buid
+test-build:
+	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
+	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk test
+
 .PHONY: install
 install:
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install
-- 
2.9.3

  reply	other threads:[~2017-02-15 15:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 15:13 [dpdk-dev] [RFC 17.05] test: move tests to separate folder Ferruh Yigit
2017-02-14 15:41 ` Bruce Richardson
2017-02-14 15:51   ` Wiles, Keith
2017-02-14 16:12   ` Mcnamara, John
2017-02-15  9:03     ` Thomas Monjalon
2017-02-14 17:07   ` Ferruh Yigit
2017-02-14 17:30     ` Richardson, Bruce
2017-02-15  2:11       ` Yuanhan Liu
2017-02-15 10:06         ` Ferruh Yigit
2017-02-15 11:16           ` Thomas Monjalon
2017-02-15 11:28             ` Ferruh Yigit
2017-02-14 16:15 ` Mcnamara, John
2017-02-15 15:26 ` [dpdk-dev] [PATCH 1/4] " Ferruh Yigit
2017-02-15 15:26   ` Ferruh Yigit [this message]
2017-02-15 16:58     ` [dpdk-dev] [PATCH 2/4] mk: do not build tests by default Thomas Monjalon
2017-02-15 17:30       ` Ferruh Yigit
2017-02-16  8:53         ` Thomas Monjalon
2017-02-16 10:07           ` Ferruh Yigit
2017-02-15 15:26   ` [dpdk-dev] [PATCH 3/4] mk: add new test-run make rule Ferruh Yigit
2017-02-15 17:07     ` Bruce Richardson
2017-02-15 17:41       ` Ferruh Yigit
2017-02-16  9:08         ` Bruce Richardson
2017-02-16  9:26     ` Thomas Monjalon
2017-02-16 10:21       ` Ferruh Yigit
2017-02-16 10:44         ` Thomas Monjalon
2017-02-15 15:26   ` [dpdk-dev] [PATCH 4/4] mk: rename test related make rules Ferruh Yigit
2017-02-16  9:10   ` [dpdk-dev] [PATCH 1/4] test: move tests to separate folder Bruce Richardson
2017-02-16 14:57   ` [dpdk-dev] [PATCH v2 1/5] " Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 2/5] mk: do not build tests by default Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 3/5] mk: add new test-basic make rule Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 4/5] mk: rename test related make rules Ferruh Yigit
2017-02-16 14:57     ` [dpdk-dev] [PATCH v2 5/5] doc: document test related make rules in make help Ferruh Yigit
2017-02-20 15:23       ` Mcnamara, John
2017-02-28 15:19     ` [dpdk-dev] [PATCH v2 1/5] test: move tests to separate folder Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170215152632.25081-2-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).