From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 4/4] test-runner: fix subtest option
Date: Wed, 18 Aug 2021 10:26:03 -0700 [thread overview]
Message-ID: <20210818172603.266294-4-prestwoj@gmail.com> (raw)
In-Reply-To: <20210818172603.266294-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 914 bytes --]
This was not working correctly and would run all subtests when only a single
was requested
---
tools/test-runner | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/test-runner b/tools/test-runner
index dc65cca4..a19ce1d9 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -1271,16 +1271,18 @@ def pre_test(ctx, test, copied):
# Prune down any subtests if needed
if ctx.args.sub_tests:
ctx.args.sub_tests = ctx.args.sub_tests.split(',')
+
+ to_run = [x.split('.')[0] for x in ctx.args.sub_tests]
pruned = []
for s in subtests:
- file = s
+ no_ext = s
# Handle <file>.<test function> format
if '.' in s:
- file = s.split('.')[0] + '.py'
+ no_ext = s.split('.')[0]
- if file == s:
- pruned.append(file)
+ if no_ext in to_run:
+ pruned.append(no_ext + '.py')
subtests = pruned
--
2.31.1
prev parent reply other threads:[~2021-08-18 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 17:26 [PATCH 1/4] network: handle NULL/hotspot networks when removing secrets James Prestwood
2021-08-18 17:26 ` [PATCH 2/4] hwsim: add Rule.remove_all() James Prestwood
2021-08-18 17:26 ` [PATCH 3/4] auto-t: fix error handling in testHotspot James Prestwood
2021-08-18 17:26 ` James Prestwood [this message]
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=20210818172603.266294-4-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.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