linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: brendanhiggins@google.com, shuah@kernel.org
Cc: corbet@lwn.net, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, SeongJae Park <sjpark@amazon.de>
Subject: [PATCH 5/6] kunit: Place 'test.log' under the 'build_dir'
Date: Mon,  2 Dec 2019 08:25:23 +0900	[thread overview]
Message-ID: <1575242724-4937-6-git-send-email-sj38.park@gmail.com> (raw)
In-Reply-To: <1575242724-4937-1-git-send-email-sj38.park@gmail.com>

From: SeongJae Park <sjpark@amazon.de>

'kunit' writes the 'test.log' under the kernel source directory even
though a 'build_dir' option is given.  As users who use the option might
expect the outputs to be placed under the specified directory, this
commit modifies the logic to write the log file under the 'build_dir'.

Signed-off-by: SeongJae Park <sjpark@amazon.de>
---
 tools/testing/kunit/kunit_kernel.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index bf38768..b640939 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -143,7 +143,7 @@ class LinuxSourceTree(object):
 	def run_kernel(self, args=[], timeout=None, build_dir=None):
 		args.extend(['mem=256M'])
 		process = self._ops.linux_bin(args, timeout, build_dir)
-		with open('test.log', 'w') as f:
+		with open(os.path.join(build_dir, 'test.log'), 'w') as f:
 			for line in process.stdout:
 				f.write(line.rstrip().decode('ascii') + '\n')
 				yield line.rstrip().decode('ascii')
-- 
2.7.4


  parent reply	other threads:[~2019-12-01 23:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01 23:25 [PATCH 0/6] Fix nits in the kunit SeongJae Park
2019-12-01 23:25 ` [PATCH 1/6] docs/kunit/start: Use in-tree 'kunit_defconfig' SeongJae Park
2019-12-02 17:13   ` Brendan Higgins
2019-12-01 23:25 ` [PATCH 2/6] docs/kunit/start: Skip wrapper run command SeongJae Park
2019-12-02 17:25   ` Brendan Higgins
2019-12-02 20:59     ` SeongJae Park
2019-12-03  8:27       ` SeongJae Park
2019-12-02 21:03     ` David Gow
2019-12-02 21:09       ` SeongJae Park
2019-12-01 23:25 ` [PATCH 3/6] kunit: Remove duplicated defconfig creation SeongJae Park
2019-12-02 17:27   ` Brendan Higgins
2019-12-01 23:25 ` [PATCH 4/6] kunit: Create default config in 'build_dir' SeongJae Park
2019-12-03  6:40   ` Brendan Higgins
2019-12-03  8:28     ` SeongJae Park
2019-12-01 23:25 ` SeongJae Park [this message]
2019-12-03  6:48   ` [PATCH 5/6] kunit: Place 'test.log' under the 'build_dir' Brendan Higgins
2019-12-01 23:25 ` [PATCH 6/6] kunit: Rename 'kunitconfig' to '.kunitconfig' SeongJae Park
2019-12-03  7:00 ` [PATCH 0/6] Fix nits in the kunit Brendan Higgins
2019-12-03  7:10   ` SeongJae Park
2019-12-03  8:25     ` SeongJae Park
2019-12-03 17:45       ` Brendan Higgins
2019-12-03 18:10         ` SeongJae Park
2019-12-03 22:35           ` Brendan Higgins

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=1575242724-4937-6-git-send-email-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sjpark@amazon.de \
    /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).