DPDK CI discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: ci@dpdk.org
Cc: aconole@redhat.com, alialnu@nvidia.com,
	Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [dpdk-ci] [PATCH v2 1/4] create_new_execution_file_from_tags: change tag argument
Date: Wed, 13 Oct 2021 10:00:07 -0400	[thread overview]
Message-ID: <20211013140010.25400-1-ohilyard@iol.unh.edu> (raw)

From: Owen Hilyard <ohilyard@iol.unh.edu>

BREAKING CHANGE: --tags syntax changed

Due to limitations of the argparse library, you can't have 2 varidic
arguments. Since upcoming requirements for the CI require the ability to
specify individual tests to be run (ex: weekly rte_flow testing), this
script must have the ability to pass in those tests as well. This is a
change made to support that.

Old syntax:
"--tags core documentation"

New syntax:
"--tag core --tag documentation"

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 tools/create_new_execution_file_from_tags.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/create_new_execution_file_from_tags.py b/tools/create_new_execution_file_from_tags.py
index d1d4447..b88fa93 100755
--- a/tools/create_new_execution_file_from_tags.py
+++ b/tools/create_new_execution_file_from_tags.py
@@ -73,7 +73,8 @@ def __str__(self):
     parser.add_argument('output_path', help='The path to the output execution file')
     parser.add_argument('testing_type', type=TestingType, choices=list(TestingType),
                         help='What type of testing to create an execution file for')
-    parser.add_argument('tags', metavar='tag', type=str, nargs='*', help='The tags to create an execution file for.')
+    parser.add_argument('--tag', type=str, action='append',
+                        help='The tags to create an execution file for.')
 
     args = parser.parse_args()
 
@@ -86,7 +87,9 @@ def __str__(self):
     test_map = {key: parse_comma_delimited_list_from_string(value.strip()) for key, value in
                 tag_to_test_map_parser[str(args.testing_type)].items()}
 
-    tests = map_tags_to_tests(args.tags, test_map)
+    tests = set()
+    if args.tag is not None:
+        tests = map_tags_to_tests(args.tag, test_map)
 
     try:
         output_file = open(args.output_path, 'x')
@@ -98,7 +101,11 @@ def __str__(self):
         if execution_plan != 'DEFAULT':
             test_allowlist = parse_comma_delimited_list_from_string(
                 template_execution_file_parser[execution_plan]['test_suites'])
-            tests_to_run = list(set(test_allowlist).intersection(tests))
+            if len(tests) != 0:
+                tests_to_run = list(set(test_allowlist).intersection(tests))
+            else:  # no tags given
+                tests_to_run = [entry for entry in test_allowlist if entry != '']
+
             tests_to_run.sort()
             template_execution_file_parser[execution_plan]['test_suites'] = ", ".join(tests_to_run)
 
-- 
2.30.2


             reply	other threads:[~2021-10-13 14:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 14:00 ohilyard [this message]
2021-10-13 14:00 ` [dpdk-ci] [PATCH v2 2/4] create_new_execution_file_from_tags: add test argument ohilyard
2021-10-13 14:00 ` [dpdk-ci] [PATCH v2 3/4] guess_git_tree: module doc comment moved ohilyard
2021-10-13 14:00 ` [dpdk-ci] [PATCH v2 4/4] guess_git_tree: fix crash caused by empty diff ohilyard
2022-01-24 11:22 ` [PATCH v2 1/4] create_new_execution_file_from_tags: change tag argument Ali Alnubani
2022-02-01 21:35   ` [PATCH v3 " ohilyard
2022-02-03 13:14     ` Ali Alnubani
2022-02-07 14:19       ` [PATCH v4 " ohilyard
2022-02-07 14:19         ` [PATCH v4 2/4] create_new_execution_file_from_tags: add test argument ohilyard
2022-02-07 14:19         ` [PATCH v4 3/4] pw_maintainers_cli: move module doc comment ohilyard
2022-02-07 14:19         ` [PATCH v4 4/4] pw_maintainers_cli: fix crash caused by empty diff ohilyard
2022-02-07 14:20         ` [PATCH v4 1/4] create_new_execution_file_from_tags: change tag argument Owen Hilyard
2022-02-07 15:08           ` [PATCH v5 1/3] " ohilyard
2022-02-07 15:08             ` [PATCH v5 2/3] pw_maintainers_cli: move module doc comment ohilyard
2022-02-07 15:56               ` Ali Alnubani
2022-02-07 15:08             ` [PATCH v5 3/3] pw_maintainers_cli: fix crash caused by empty diff ohilyard
2022-02-07 15:56               ` Ali Alnubani
2023-06-21 15:19                 ` Ali Alnubani
2023-06-21 15:39                   ` Patrick Robb
2023-06-21 18:38                     ` Aaron Conole
2022-02-07 15:56             ` [PATCH v5 1/3] create_new_execution_file_from_tags: change tag argument Ali Alnubani
2023-06-21 18:41             ` Aaron Conole
2022-02-01 21:35   ` [PATCH v3 2/4] create_new_execution_file_from_tags: add test argument ohilyard
2022-02-01 21:35   ` [PATCH v3 3/4] pw_maintainers_cli: module doc comment moved ohilyard
2022-02-03 13:14     ` Ali Alnubani
2022-02-01 21:35   ` [PATCH v3 4/4] guess_git_tree: fix crash caused by empty diff ohilyard
2022-02-03 13:14     ` Ali Alnubani

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=20211013140010.25400-1-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=aconole@redhat.com \
    --cc=alialnu@nvidia.com \
    --cc=ci@dpdk.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).