All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Shuah Khan <shuah@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Bamvor Jian Zhang <bamv2005@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	linux-kselftest@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 11/12] selftests: Add kselftest-build target
Date: Mon, 14 Jan 2019 14:51:43 +0100	[thread overview]
Message-ID: <20190114135144.26096-12-geert+renesas@glider.be> (raw)
In-Reply-To: <20190114135144.26096-1-geert+renesas@glider.be>

The documented way to build kselftest is to run

    make -C tools/testing/selftests

with an optional "O=..." parameter to specify the output directory.

However, all of the above assume you run make from the source directory.
while other make commands can simply be run from the output directory,
too (the autogenerated Makefile in the output directory takes care of
this).

Add a "kselftest-build" target, so "make kselftest-build" can be used
from either the source or output directory.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Perhaps this make target should just be called "kselftest", and the
existing "kselftest" target be renamed to "kselftest-run"?
---
 Documentation/dev-tools/kselftest.rst | 4 ++++
 Makefile                              | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 7756f7a7c23b9408..b90b4ee6334a0941 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -21,6 +21,10 @@ To build the tests::
 
   $ make -C tools/testing/selftests
 
+Or:
+
+  $ make kselftest-build
+
 To run the tests::
 
   $ make -C tools/testing/selftests run_tests
diff --git a/Makefile b/Makefile
index 5355033dda6ed1ea..27a56de7ed45091e 100644
--- a/Makefile
+++ b/Makefile
@@ -1193,6 +1193,10 @@ PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
 
+PHONY += kselftest-build
+kselftest-build:
+	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
+
 PHONY += kselftest-clean
 kselftest-clean:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean O=$(abspath $(objtree)/tools/testing/selftests)
@@ -1445,6 +1449,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-build - Build kselftest files'
 	@echo  '  kselftest-clean - Remove all generated kselftest files'
 	@echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existing'
 	@echo  '                    .config.'
-- 
2.17.1


WARNING: multiple messages have this Message-ID
From: geert+renesas at glider.be (Geert Uytterhoeven)
Subject: [PATCH 11/12] selftests: Add kselftest-build target
Date: Mon, 14 Jan 2019 14:51:43 +0100	[thread overview]
Message-ID: <20190114135144.26096-12-geert+renesas@glider.be> (raw)
In-Reply-To: <20190114135144.26096-1-geert+renesas@glider.be>

The documented way to build kselftest is to run

    make -C tools/testing/selftests

with an optional "O=..." parameter to specify the output directory.

However, all of the above assume you run make from the source directory.
while other make commands can simply be run from the output directory,
too (the autogenerated Makefile in the output directory takes care of
this).

Add a "kselftest-build" target, so "make kselftest-build" can be used
from either the source or output directory.

Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
---
Perhaps this make target should just be called "kselftest", and the
existing "kselftest" target be renamed to "kselftest-run"?
---
 Documentation/dev-tools/kselftest.rst | 4 ++++
 Makefile                              | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 7756f7a7c23b9408..b90b4ee6334a0941 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -21,6 +21,10 @@ To build the tests::
 
   $ make -C tools/testing/selftests
 
+Or:
+
+  $ make kselftest-build
+
 To run the tests::
 
   $ make -C tools/testing/selftests run_tests
diff --git a/Makefile b/Makefile
index 5355033dda6ed1ea..27a56de7ed45091e 100644
--- a/Makefile
+++ b/Makefile
@@ -1193,6 +1193,10 @@ PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
 
+PHONY += kselftest-build
+kselftest-build:
+	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
+
 PHONY += kselftest-clean
 kselftest-clean:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean O=$(abspath $(objtree)/tools/testing/selftests)
@@ -1445,6 +1449,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-build - Build kselftest files'
 	@echo  '  kselftest-clean - Remove all generated kselftest files'
 	@echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existing'
 	@echo  '                    .config.'
-- 
2.17.1

WARNING: multiple messages have this Message-ID
From: geert+renesas@glider.be (Geert Uytterhoeven)
Subject: [PATCH 11/12] selftests: Add kselftest-build target
Date: Mon, 14 Jan 2019 14:51:43 +0100	[thread overview]
Message-ID: <20190114135144.26096-12-geert+renesas@glider.be> (raw)
Message-ID: <20190114135143.liL7trkUiCuaR6LDUGVsaDZMOuu9nda1WSlpZwoElEY@z> (raw)
In-Reply-To: <20190114135144.26096-1-geert+renesas@glider.be>

The documented way to build kselftest is to run

    make -C tools/testing/selftests

with an optional "O=..." parameter to specify the output directory.

However, all of the above assume you run make from the source directory.
while other make commands can simply be run from the output directory,
too (the autogenerated Makefile in the output directory takes care of
this).

Add a "kselftest-build" target, so "make kselftest-build" can be used
from either the source or output directory.

Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
---
Perhaps this make target should just be called "kselftest", and the
existing "kselftest" target be renamed to "kselftest-run"?
---
 Documentation/dev-tools/kselftest.rst | 4 ++++
 Makefile                              | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index 7756f7a7c23b9408..b90b4ee6334a0941 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -21,6 +21,10 @@ To build the tests::
 
   $ make -C tools/testing/selftests
 
+Or:
+
+  $ make kselftest-build
+
 To run the tests::
 
   $ make -C tools/testing/selftests run_tests
diff --git a/Makefile b/Makefile
index 5355033dda6ed1ea..27a56de7ed45091e 100644
--- a/Makefile
+++ b/Makefile
@@ -1193,6 +1193,10 @@ PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
 
+PHONY += kselftest-build
+kselftest-build:
+	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests O=$(abspath $(objtree)/tools/testing/selftests) INSTALL_HDR_PATH=$(abspath $(INSTALL_HDR_PATH))
+
 PHONY += kselftest-clean
 kselftest-clean:
 	$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean O=$(abspath $(objtree)/tools/testing/selftests)
@@ -1445,6 +1449,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-build - Build kselftest files'
 	@echo  '  kselftest-clean - Remove all generated kselftest files'
 	@echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existing'
 	@echo  '                    .config.'
-- 
2.17.1

  parent reply	other threads:[~2019-01-14 13:52 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 13:51 [PATCH 00/12] selftests: Miscellaneous fixes Geert Uytterhoeven
2019-01-14 13:51 ` Geert Uytterhoeven
2019-01-14 13:51 ` geert+renesas
2019-01-14 13:51 ` [PATCH 01/12] selftests: gpio-mockup-chardev: Check asprintf() for error Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-16 22:03   ` shuah
2019-01-16 22:03     ` shuah
2019-01-16 22:03     ` shuah
2019-01-14 13:51 ` [PATCH 02/12] selftests: Fix output directory with O= Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 03/12] selftests: Fix header install " Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 04/12] selftests: android: ion: Fix ionmap_test dependencies Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 05/12] selftests: seccomp: Fix test dependencies and rules Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 23:16   ` Kees Cook
2019-01-14 23:16     ` Kees Cook
2019-01-14 23:16     ` Kees Cook
2019-01-14 23:16     ` keescook
2019-01-14 13:51 ` [PATCH 06/12] selftests: lib.mk: Add rule to build object file from C source file Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 07/12] selftests: memfd: Fix build with O= Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 08/12] selftests: timestamping: Remove superfluous rules Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 09/12] selftests: sparc64: " Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH 10/12] selftests: intel_pstate: Remove unused header dependency rule Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` Geert Uytterhoeven [this message]
2019-01-14 13:51   ` [PATCH 11/12] selftests: Add kselftest-build target Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-14 13:51 ` [PATCH/RFC 12/12] selftests: gpio: Fix building tools/gpio from kselftests Geert Uytterhoeven
2019-01-14 13:51   ` Geert Uytterhoeven
2019-01-14 13:51   ` geert+renesas
2019-01-18  4:14 ` [PATCH 00/12] selftests: Miscellaneous fixes Masahiro Yamada
2019-01-18  4:14   ` Masahiro Yamada
2019-01-18  4:14   ` Masahiro Yamada
2019-01-18  4:14   ` yamada.masahiro
2019-01-18  7:57   ` Geert Uytterhoeven
2019-01-18  7:57     ` Geert Uytterhoeven
2019-01-18  7:57     ` Geert Uytterhoeven
2019-01-18  7:57     ` geert

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=20190114135144.26096-12-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=bamv2005@gmail.com \
    --cc=corbet@lwn.net \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=shuah@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    --subject='Re: [PATCH 11/12] selftests: Add kselftest-build target' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.