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 E5A95A034F for ; Mon, 7 Feb 2022 15:19:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD6D7410F3; Mon, 7 Feb 2022 15:19:49 +0100 (CET) Received: from mail-pl1-f225.google.com (mail-pl1-f225.google.com [209.85.214.225]) by mails.dpdk.org (Postfix) with ESMTP id 88D14410EA for ; Mon, 7 Feb 2022 15:19:48 +0100 (CET) Received: by mail-pl1-f225.google.com with SMTP id t9so9015819plg.13 for ; Mon, 07 Feb 2022 06:19:48 -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=w3ugS2hIbjuq5d9Tp2crseZaiIZ4x0BKFoN57oloQGM=; b=PKba2dpRpdX0tB9T3rUg8qS0Q4wSQajLyPSizCuIr4RbNF0esyOEJSGY44EtsquaoK 1M123RyMvVl4+8vn8iTzy2ZxBMuyZ5I5wXrg8nYcpYl6yHxdXR+qzfhYXHnwcWQNAQjJ 1nVqFigyt1QGA/M/ZSfuXZy+jlWEYuztxJ/MM= 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=w3ugS2hIbjuq5d9Tp2crseZaiIZ4x0BKFoN57oloQGM=; b=rtPG+4B8QxqJrnPIc6GTuLoHIyZaxk3naMlc1ljPmbyzTYJfyzDPHzp9zcDgZLstFb AcwuByLelkD2izblk9MAlzt2ShI8dB6BzIBJ3dbfLSI11fwiZs4Xq2Ju3gM6t+ADxeXT iaS5TWWg24LO0svpcSJmK5hHvpNVAVPNvmAPLbetAUcjAsUEV6I+V7QeR2EEe1z2EfhF n4IsVkxQODpKIj1Hp7kF58XMYYLX7P4esGttGdVqDOxxcNVvZ+r+GK+c1ckOYmYqqsO9 LeTFc+qC66X88FnqXbO41XYzmjVmb80Zm1W3nliPfzFgQlB4E8G8AYskLpNBg/nLjhNL nlCw== X-Gm-Message-State: AOAM533k5BXzl4En7VdpUXMSpv3WAbR0BCZ7blrgycUzwrXrI0KJNWNX h3o39UxIv4GkP5oqoumM15unfVrufwnmdERblpANelNYNJZAylwuBeZ74+AgofYyVJENcBL2aYl qlyS3a1XSot1itA6lpAdXTozZxEoBviceYwMZrEU80CtVHmFmmKGbOwtH/C+BcWRntkHj3qKt X-Google-Smtp-Source: ABdhPJzWyTyEVMij9LqSWKvnOR7udi+p+fDX76hDy7HTEnnekE9+ZKA5nuNX1FKC9td+MerUHl0TiE8Vn5pG X-Received: by 2002:a17:90a:ac0f:: with SMTP id o15mr4118274pjq.140.1644243587724; Mon, 07 Feb 2022 06:19:47 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id il7sm748272pjb.14.2022.02.07.06.19.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Feb 2022 06:19:47 -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 A36CD605246B; Mon, 7 Feb 2022 09:19:46 -0500 (EST) From: ohilyard@iol.unh.edu To: ci@dpdk.org, alialnu@nvidia.com Cc: Owen Hilyard Subject: [PATCH v4 1/4] create_new_execution_file_from_tags: change tag argument Date: Mon, 7 Feb 2022 09:19:40 -0500 Message-Id: <20220207141943.11673-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 | 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..60ad663 100755 --- a/tools/create_new_execution_file_from_tags.py +++ b/tools/create_new_execution_file_from_tags.py @@ -73,7 +73,8 @@ 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.') args = parser.parse_args() @@ -86,7 +87,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 +101,11 @@ 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 != ''] + tests_to_run.sort() template_execution_file_parser[execution_plan]['test_suites'] = ", ".join(tests_to_run) -- 2.30.2