linux-doc.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, sjpark@amazon.de
Subject: [PATCH v2 4/5] kunit: Place 'test.log' under the 'build_dir'
Date: Tue,  3 Dec 2019 17:19:00 +0900	[thread overview]
Message-ID: <1575361141-6806-5-git-send-email-sj38.park@gmail.com> (raw)
In-Reply-To: <1575361141-6806-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>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
---
 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 c04a12e..5bec97e 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-03  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  8:18 [PATCH v2 0/5] Fix nits in the kunit SeongJae Park
2019-12-03  8:18 ` [PATCH v2 1/5] docs/kunit/start: Use in-tree 'kunit_defconfig' SeongJae Park
2019-12-03  8:18 ` [PATCH v2 2/5] kunit: Remove duplicated defconfig creation SeongJae Park
2019-12-03  8:18 ` [PATCH v2 3/5] kunit: Create default config in '--build_dir' SeongJae Park
2019-12-03  8:19 ` SeongJae Park [this message]
2019-12-03  8:19 ` [PATCH v2 5/5] kunit: Rename 'kunitconfig' to '.kunitconfig' SeongJae Park
2019-12-03 17:41   ` 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=1575361141-6806-5-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 \
    --subject='Re: [PATCH v2 4/5] kunit: Place '\''test.log'\'' under the '\''build_dir'\''' \
    /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 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).