diff mbox

[dpdk-dev,2/4] mk: do not build tests by default

Message ID d8920be0-5629-2ee2-fe90-9265fb07b0d6@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit Feb. 15, 2017, 5:30 p.m. UTC
On 2/15/2017 4:58 PM, Thomas Monjalon wrote:
> 2017-02-15 15:26, Ferruh Yigit:
>> +.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
> 
> Why not rely on default rule below?
> 
> # all other build targets
> %:
>     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
>     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@


Because generic rule is using "rte.sdkbuild.mk $@" rule,
for unit-test, $@ is test-build, but sdkbuild rule is "test"

This can be solved with adding following to sdkbuild.mk:



I can update if you think this is better?

Thanks,
ferruh

Comments

Thomas Monjalon Feb. 16, 2017, 8:53 a.m. UTC | #1
2017-02-15 17:30, Ferruh Yigit:
> On 2/15/2017 4:58 PM, Thomas Monjalon wrote:
> > 2017-02-15 15:26, Ferruh Yigit:
> >> +.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
> > 
> > Why not rely on default rule below?
> > 
> > # all other build targets
> > %:
> >     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
> >     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@
> 
> 
> Because generic rule is using "rte.sdkbuild.mk $@" rule,
> for unit-test, $@ is test-build, but sdkbuild rule is "test"
> 
> This can be solved with adding following to sdkbuild.mk:
> 
> --- a/mk/rte.sdkbuild.mk
> +++ b/mk/rte.sdkbuild.mk
> @@ -72,6 +72,9 @@ clean: $(CLEANDIRS)
>         $(Q)$(MAKE) -f $(RTE_SDK)/GNUmakefile gcovclean
>         @echo Clean complete
> 
> +.PHONY: test-build
> +test-build: test
> +
>  .SECONDEXPANSION:
>  .PHONY: $(ROOTDIRS-y) test
>  $(ROOTDIRS-y) test:
> 
> 
> I can update if you think this is better?

Yes it seems better. Or you can just rename test into test-build
in rte.sdkbuild.mk.
Ferruh Yigit Feb. 16, 2017, 10:07 a.m. UTC | #2
On 2/16/2017 8:53 AM, Thomas Monjalon wrote:
> 2017-02-15 17:30, Ferruh Yigit:
>> On 2/15/2017 4:58 PM, Thomas Monjalon wrote:
>>> 2017-02-15 15:26, Ferruh Yigit:
>>>> +.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
>>>
>>> Why not rely on default rule below?
>>>
>>> # all other build targets
>>> %:
>>>     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
>>>     $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@
>>
>>
>> Because generic rule is using "rte.sdkbuild.mk $@" rule,
>> for unit-test, $@ is test-build, but sdkbuild rule is "test"
>>
>> This can be solved with adding following to sdkbuild.mk:
>>
>> --- a/mk/rte.sdkbuild.mk
>> +++ b/mk/rte.sdkbuild.mk
>> @@ -72,6 +72,9 @@ clean: $(CLEANDIRS)
>>         $(Q)$(MAKE) -f $(RTE_SDK)/GNUmakefile gcovclean
>>         @echo Clean complete
>>
>> +.PHONY: test-build
>> +test-build: test
>> +
>>  .SECONDEXPANSION:
>>  .PHONY: $(ROOTDIRS-y) test
>>  $(ROOTDIRS-y) tes
>>
>>
>> I can update if you think this is better?
> 
> Yes it seems better. Or you can just rename test into test-build
> in rte.sdkbuild.mk.

Can't update to "test-build" in rte.sdkbuild.mk, it needs to be folder
name. I will send new version with above update.

Thanks,
ferruh
diff mbox

Patch

--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -72,6 +72,9 @@  clean: $(CLEANDIRS)
        $(Q)$(MAKE) -f $(RTE_SDK)/GNUmakefile gcovclean
        @echo Clean complete

+.PHONY: test-build
+test-build: test
+
 .SECONDEXPANSION:
 .PHONY: $(ROOTDIRS-y) test
 $(ROOTDIRS-y) test: