From: "Bird, Timothy" <Tim.Bird@sony.com>
To: Shuah Khan <shuahkh@osg.samsung.com>,
"yamada.masahiro@socionext.com" <yamada.masahiro@socionext.com>,
"mmarek@suse.com" <mmarek@suse.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"bamvor.zhangjian@linaro.org" <bamvor.zhangjian@linaro.org>,
"emilio.lopez@collabora.co.uk" <emilio.lopez@collabora.co.uk>,
"corbet@lwn.net" <corbet@lwn.net>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
"ebiederm@xmission.com" <ebiederm@xmission.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Subject: RE: [PATCH 09/11] selftests: lib.mk: copy test scripts and test files for make O=dir run
Date: Wed, 13 Sep 2017 18:14:02 +0000 [thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF3AD1BF23@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <7778068aed3cd76e2bc7f589e2409fe5a9eed75f.1505257614.git.shuahkh@osg.samsung.com>
> -----Original Message-----
> From: Shuah Khan on Tuesday, September 12, 2017 4:53 PM
>
> For make O=dir run_tests to work, test scripts, test files, and other
> dependencies need to be copied over to the object directory. Running
> tests from the object directory is necessary to avoid making the source
> tree dirty.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
> tools/testing/selftests/lib.mk | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index 2e13cabb8007..9aa820d35c0c 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -37,7 +37,18 @@ define RUN_TESTS
> endef
>
> run_tests: all
> +ifneq ($(KBUILD_SRC),)
> + @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" !=
> "X" ]; then
> + @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED)
> $(TEST_FILES) $(OUTPUT)
rsync seems a bit heavy-handed for this. Is there a reason to use
rsync vs. just a regular cp? Does the existing kbuild system already
have a dependency on rsync? If not, I don't think we should introduce one
here.
BTW - great work!
> + fi
> + @if [ "X$(TEST_PROGS)" != "X" ]; then
> + $(call RUN_TESTS, $(TEST_GEN_PROGS)
> $(TEST_CUSTOM_PROGS) $(OUTPUT)/$(TEST_PROGS))
> + else
> + $(call RUN_TESTS, $(TEST_GEN_PROGS)
> $(TEST_CUSTOM_PROGS))
> + fi
> +else
> $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS)
> $(TEST_PROGS))
> +endif
>
> define INSTALL_RULE
> @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" !=
> "X" ]; then \
> --
> 2.11.0
>
next prev parent reply other threads:[~2017-09-13 18:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 23:52 [PATCH 00/11] Kselftest make O=dir work Shuah Khan
2017-09-12 23:52 ` [PATCH 01/11] Makefile: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
2017-09-18 23:14 ` Shuah Khan
2017-09-20 3:39 ` Masahiro Yamada
2017-09-20 17:30 ` Shuah Khan
2017-09-12 23:52 ` [PATCH 02/11] selftests: lib.mk: " Shuah Khan
2017-09-12 23:52 ` [PATCH 03/11] selftests: Makefile: clear LDFLAGS for make O=dir use-case Shuah Khan
2017-09-12 23:52 ` [PATCH 04/11] selftests: lib.mk: fix test executable status check to use full path Shuah Khan
2017-09-12 23:52 ` [PATCH 05/11] selftests: watchdog: fix to use TEST_GEN_PROGS and remove clean Shuah Khan
2017-09-12 23:52 ` [PATCH 06/11] selftests: lib.mk: add TEST_CUSTOM_PROGS to allow custom test run/install Shuah Khan
2017-09-12 23:53 ` [PATCH 07/11] selftests: sync: use TEST_CUSTOM_PROGS instead of TEST_PROGS Shuah Khan
2017-09-12 23:53 ` [PATCH 08/11] selftests: sync: kselftest and kselftest-clean fail for make O=dir case Shuah Khan
2017-09-12 23:53 ` [PATCH 09/11] selftests: lib.mk: copy test scripts and test files for make O=dir run Shuah Khan
2017-09-13 18:14 ` Bird, Timothy [this message]
2017-09-13 19:43 ` Shuah Khan
2017-09-12 23:53 ` [PATCH 10/11] selftests: futex: copy sub-dir test scripts " Shuah Khan
2017-09-13 18:15 ` Bird, Timothy
2017-09-23 0:36 ` Darren Hart
2017-09-12 23:53 ` [PATCH 11/11] selftests: mqueue: Use full path to run tests from Makefile Shuah Khan
2017-09-13 0:58 ` [PATCH 00/11] Kselftest make O=dir work Greg KH
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=ECADFF3FD767C149AD96A924E7EA6EAF3AD1BF23@USCULXMSG01.am.sony.com \
--to=tim.bird@sony.com \
--cc=bamvor.zhangjian@linaro.org \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=emilio.lopez@collabora.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mmarek@suse.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
--cc=yamada.masahiro@socionext.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
all inboxes | Powered by JetHome®