linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Shuah Khan <skhan@linuxfoundation.org>,
	Brendan Higgins <brendanhiggins@google.com>
Cc: Daniel Latypov <dlatypov@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
Date: Fri, 8 Oct 2021 15:29:30 +1100	[thread overview]
Message-ID: <20211008152930.03787395@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2490 bytes --]

Hi all,

Today's linux-next merge of the kunit-next tree got a conflict in:

  tools/testing/kunit/kunit.py

between commit:

  d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")

from the kunit-fixes tree and commit:

  6710951ee039 ("kunit: tool: support running each suite/test separately")

from the kunit-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/kunit/kunit.py
index ac35c61f65f5,7197e5fb8342..000000000000
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@@ -16,9 -17,8 +17,8 @@@ assert sys.version_info >= (3, 7), "Pyt
  
  from collections import namedtuple
  from enum import Enum, auto
- from typing import Iterable, Sequence
 -from typing import Iterable, List
++from typing import Iterable, Sequence, List
  
- import kunit_config
  import kunit_json
  import kunit_kernel
  import kunit_parser
@@@ -184,28 -231,8 +231,28 @@@ def run_tests(linux: kunit_kernel.Linux
  				config_result.elapsed_time,
  				build_result.elapsed_time,
  				exec_result.elapsed_time))
- 	return parse_result
+ 	return exec_result
  
 +# Problem:
 +# $ kunit.py run --json
 +# works as one would expect and prints the parsed test results as JSON.
 +# $ kunit.py run --json suite_name
 +# would *not* pass suite_name as the filter_glob and print as json.
 +# argparse will consider it to be another way of writing
 +# $ kunit.py run --json=suite_name
 +# i.e. it would run all tests, and dump the json to a `suite_name` file.
 +# So we hackily automatically rewrite --json => --json=stdout
 +pseudo_bool_flag_defaults = {
 +		'--json': 'stdout',
 +		'--raw_output': 'kunit',
 +}
 +def massage_argv(argv: Sequence[str]) -> Sequence[str]:
 +	def massage_arg(arg: str) -> str:
 +		if arg not in pseudo_bool_flag_defaults:
 +			return arg
 +		return  f'{arg}={pseudo_bool_flag_defaults[arg]}'
 +	return list(map(massage_arg, argv))
 +
  def add_common_opts(parser) -> None:
  	parser.add_argument('--build_dir',
  			    help='As in the make command, it specifies the build '

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2021-10-08  4:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  4:29 Stephen Rothwell [this message]
2021-10-08 16:31 ` linux-next: manual merge of the kunit-next tree with the kunit-fixes tree Shuah Khan
2021-10-08 20:03   ` Brendan Higgins
2021-10-08 20:48     ` Daniel Latypov
2021-10-19 21:26   ` Shuah Khan
2021-10-19 21:40     ` Daniel Latypov
2021-10-19 22:20     ` Stephen Rothwell
2022-11-01  3:31 Stephen Rothwell
2023-02-01  2:49 Stephen Rothwell
2023-02-01  4:31 ` David Gow
2023-02-01  5:37   ` Stephen Rothwell

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=20211008152930.03787395@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=brendanhiggins@google.com \
    --cc=dlatypov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /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).