From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E46F1A034F for ; Mon, 7 Feb 2022 16:08:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFD11410FB; Mon, 7 Feb 2022 16:08:40 +0100 (CET) Received: from mail-ot1-f100.google.com (mail-ot1-f100.google.com [209.85.210.100]) by mails.dpdk.org (Postfix) with ESMTP id E450F410EA for ; Mon, 7 Feb 2022 16:08:39 +0100 (CET) Received: by mail-ot1-f100.google.com with SMTP id g15-20020a9d6b0f000000b005a062b0dc12so11089470otp.4 for ; Mon, 07 Feb 2022 07:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hB/tEnq+KTBhAwWQHXJSRXJx7rJHQK1yOhXchGbr9FY=; b=fhH+SJ7ssCbYxtBUQlhma4VRthgEbXlha47Y4MfzOBTeVACjFE7fW8R5GdHNooOQG1 oIO0hKtXZyU3lzgapWdhf4kEOQklBgLRtHh35qBo0KvTY2xMrFA+vVk4M/0Mq+qtVmQf 1y6LWvqygltiCkzEOmSIqWoqj9I/6hcZBPOd8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hB/tEnq+KTBhAwWQHXJSRXJx7rJHQK1yOhXchGbr9FY=; b=PoF79hcMKesOyjJArSAzkO7caV7uCtYZadAYHhk01e/RPYFnNzYsN0X7UWWAiSxWPN OLkIEQGbnoHCjdrcN46K68Q+Zjmr5niD+oEBTEhV2dPR+E79bt/qgzo4VFBn+TvSIcKs OBiyG1hYcRdUoT6oAaefMDzZ+eBuRaTPJ00xNq+XxYyLYCkHe5hBtLazNrNX8Izi9vvJ KhTfOzrh88HpS6tpqSxwjvbZyAdWyFWQzuE6dysLfr7qxMDSQV1eS3BqZA6JxL6pCM5v HnDq6tX6HqYfZm2BKHG5fG2a0bZlfhbY5nk8wVc88mfb+07zsjyXZwn33GlTe1ZUXdcF A8GQ== X-Gm-Message-State: AOAM532DE061Yg9lhP63puWc4ZJnlTB4mRnjsYGSJOPNX0VOOIQ4GfBU yQAwihXiZz19+sAT+0/zI6gosGOvZxaRal1T6IL2FBdUMNS/4ccWWwPj4e8S2BSdONvrA9quoGg yzCBgPbGvgF/lTFH9pKEPQuzzdTm5gwjMXDLvCWTPf0DyJTp22f41KnGML1sqvcaqwlwsZZ0FuV 70ausPBSNrfF3Q X-Google-Smtp-Source: ABdhPJx1KCw52UH4cZPh5KYDze3kypZrNY1uvHWjOkZYRjXQ7J5rSEY3hteFShmPtr2hOBaqQoNy+v9XZwJz X-Received: by 2002:a05:6830:4409:: with SMTP id q9mr76982otv.316.1644246519146; Mon, 07 Feb 2022 07:08:39 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id i14sm671559oon.21.2022.02.07.07.08.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Feb 2022 07:08:39 -0800 (PST) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d]) by postal.iol.unh.edu (Postfix) with ESMTP id CDDD2605246B; Mon, 7 Feb 2022 10:08:37 -0500 (EST) From: ohilyard@iol.unh.edu To: ci@dpdk.org, alialnu@nvidia.com Cc: Owen Hilyard Subject: [PATCH v5 1/3] create_new_execution_file_from_tags: change tag argument Date: Mon, 7 Feb 2022 10:08:24 -0500 Message-Id: <20220207150826.18950-1-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org From: Owen Hilyard 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 --- tools/create_new_execution_file_from_tags.py | 18 +++++++++++++++--- 1 file changed, 15 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..f2081ee 100755 --- a/tools/create_new_execution_file_from_tags.py +++ b/tools/create_new_execution_file_from_tags.py @@ -73,7 +73,10 @@ if __name__ == '__main__': 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.') + parser.add_argument('--test', type=str, action='append', + help='The tests to run along with the tests required by the provided tags') args = parser.parse_args() @@ -86,7 +89,9 @@ if __name__ == '__main__': 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.tags, test_map) try: output_file = open(args.output_path, 'x') @@ -98,7 +103,14 @@ if __name__ == '__main__': 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: + tests_to_run = [entry for entry in test_allowlist if entry != ''] + + if args.test is not None: + for test in args.test: + tests_to_run.append(test) tests_to_run.sort() template_execution_file_parser[execution_plan]['test_suites'] = ", ".join(tests_to_run) -- 2.30.2