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 02382A00C5 for ; Tue, 1 Feb 2022 22:35:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFA07411AB; Tue, 1 Feb 2022 22:35:55 +0100 (CET) Received: from mail-qt1-f227.google.com (mail-qt1-f227.google.com [209.85.160.227]) by mails.dpdk.org (Postfix) with ESMTP id 5692640691 for ; Tue, 1 Feb 2022 22:35:55 +0100 (CET) Received: by mail-qt1-f227.google.com with SMTP id y8so15660451qtn.8 for ; Tue, 01 Feb 2022 13:35:55 -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=O2QKy13U8YUYUfEFVbZvUq7TotNwN8OUfyDzBJ8HnOx0wNLUEkaQEsK+PQjKDpSscP UEeHBmhNgHO38RiWmfi42+hZNiUiqJ7sFTczXq1wn4uHSg2lhabETCmrCaEMjQE1/v13 JEZw+/3HOo9E0NCrFNAG63so08M7ghV4lK/h8= 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=FD6XRmgF/rsj8AUoZvRLjv8/+qGgCjwJaPg7X1nnm2zE5CV8gyUpgG+0at7Q4V/5/N XqnALd70QichBN22ffyEVdB9CNZ12/3UVojYDesPPjoDZSwWdVkbPQHgn2MuiDOIN0bG U6KQcr4tOnxyghL44Znj8KukwnnbGFebdjshsKChfpiL/Rt4o192MAUHnx9QAv2+syqE Qd1olp4czO1JPaiqpCQMYFg1rYWN3LrbLg/YOLAuveiHEQSA9mBL9qMy6FlYcL8QDbxI IOyc26Mv5QYrxFomPf+0toSef3FDRsjqHQMYCoG0ZuOGvRGs+LpC0pnuzITCgsQfV81i FBnw== X-Gm-Message-State: AOAM533Cjg0+6otpjEMxWekaUBQS5Z9tKzaZubE/NO1RdBERTqExFPGM Hg5UOF0k04u+sl4JSXfUTggiTfEhJ1/huvQrfx+ZbtDM286i8GxkfxsyEFaiKT5XLCEBDkeEfcw iFlWb/U/hE1c//roZnIQuXpplaC6PNinE0zenmBM2XU12QeMtpNKlBDHyliMl8Gtck23PV+dU X-Google-Smtp-Source: ABdhPJzZZgnw0bTRn4bx9wkU+ii1bLSl8XkkPhj8p9u829811aaa8BrluJrNn7lwosRIIEfpkOCASY9nG7J4 X-Received: by 2002:ac8:4d45:: with SMTP id x5mr20748159qtv.404.1643751354727; Tue, 01 Feb 2022 13:35:54 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id c8sm4065106qkj.5.2022.02.01.13.35.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Feb 2022 13:35:54 -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 DB21A605246B; Tue, 1 Feb 2022 16:35:53 -0500 (EST) From: ohilyard@iol.unh.edu To: ci@dpdk.org, alialnu@nvidia.com Cc: Owen Hilyard Subject: [PATCH v3 1/4] create_new_execution_file_from_tags: change tag argument Date: Tue, 1 Feb 2022 16:35:42 -0500 Message-Id: <20220201213544.15754-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