diff mbox

[v2] kselftest: add kselftest-clean rule

Message ID 1444272078-7087-1-git-send-email-long.wanglong@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang Long Oct. 8, 2015, 2:41 a.m. UTC
We use

    $make TARGETS="size timers" kselftest

to build and run selftests. but there is no rule
for us to clean the kselftest generated files.

This patch add the rules, for example:

	$ make TARGETS="size timers" kselftest-clean

can clean all kselftest generated files.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michael Ellerman Oct. 8, 2015, 3:52 a.m. UTC | #1
On Thu, 2015-10-08 at 02:41 +0000, Wang Long wrote:
> We use
> 
>     $make TARGETS="size timers" kselftest
> 
> to build and run selftests. but there is no rule
> for us to clean the kselftest generated files.
> 
> This patch add the rules, for example:
> 
> 	$ make TARGETS="size timers" kselftest-clean
> 
> can clean all kselftest generated files.
> 
> Signed-off-by: Wang Long <long.wanglong@huawei.com>
> ---
>  Makefile | 4 ++++
>  1 file changed, 4 insertions(+)

Thanks that's much neater.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers



--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek Oct. 8, 2015, 12:21 p.m. UTC | #2
On Thu, Oct 08, 2015 at 02:52:04PM +1100, Michael Ellerman wrote:
> On Thu, 2015-10-08 at 02:41 +0000, Wang Long wrote:
> > We use
> > 
> >     $make TARGETS="size timers" kselftest
> > 
> > to build and run selftests. but there is no rule
> > for us to clean the kselftest generated files.
> > 
> > This patch add the rules, for example:
> > 
> > 	$ make TARGETS="size timers" kselftest-clean
> > 
> > can clean all kselftest generated files.
> > 
> > Signed-off-by: Wang Long <long.wanglong@huawei.com>
> > ---
> >  Makefile | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> Thanks that's much neater.
> 
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to kbuild.git#kbuild.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shuah Khan Oct. 8, 2015, 1:26 p.m. UTC | #3
On 10/08/2015 06:21 AM, Michal Marek wrote:
> On Thu, Oct 08, 2015 at 02:52:04PM +1100, Michael Ellerman wrote:
>> On Thu, 2015-10-08 at 02:41 +0000, Wang Long wrote:
>>> We use
>>>
>>>     $make TARGETS="size timers" kselftest
>>>
>>> to build and run selftests. but there is no rule
>>> for us to clean the kselftest generated files.
>>>
>>> This patch add the rules, for example:
>>>
>>> 	$ make TARGETS="size timers" kselftest-clean
>>>
>>> can clean all kselftest generated files.
>>>
>>> Signed-off-by: Wang Long <long.wanglong@huawei.com>
>>> ---
>>>  Makefile | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>
>> Thanks that's much neater.
>>
>> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> Applied to kbuild.git#kbuild.
> 


Thanks for getting this in.

-- Shuah
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 1d341eb..3edd7b3 100644
--- a/Makefile
+++ b/Makefile
@@ -1075,6 +1075,9 @@  PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C tools/testing/selftests run_tests
 
+kselftest-clean:
+	$(Q)$(MAKE) -C tools/testing/selftests clean
+
 # ---------------------------------------------------------------------------
 # Modules
 
@@ -1282,6 +1285,7 @@  help:
 	@echo  '  kselftest       - Build and run kernel selftest (run as root)'
 	@echo  '                    Build, install, and boot kernel before'
 	@echo  '                    running kselftest on it'
+	@echo  '  kselftest-clean - Remove all generated kselftest files'
 	@echo  ''
 	@echo  'Kernel packaging:'
 	@$(MAKE) $(build)=$(package-dir) help