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 5961BA0C55 for ; Wed, 13 Oct 2021 16:00:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 506F0410DA; Wed, 13 Oct 2021 16:00:14 +0200 (CEST) Received: from mail-qt1-f226.google.com (mail-qt1-f226.google.com [209.85.160.226]) by mails.dpdk.org (Postfix) with ESMTP id 21C5040E64 for ; Wed, 13 Oct 2021 16:00:13 +0200 (CEST) Received: by mail-qt1-f226.google.com with SMTP id w2so2645086qtn.0 for ; Wed, 13 Oct 2021 07:00:13 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=pRy9rq5qs1Jktojwne/XAT46IRn8q5uLGfbapuM1rYs=; b=HVtjwES/lPf5PVEeu6L1sDQ6ylH5Y948VsTvhFsb9+CLmr+AA6LG/9C0oayr+HSwHK leKTqzdC8ajsHip5ZgD/ytizx2U5hc3XHe98ukNPUqYdWsxaC6niCKQTKm4TqPz9ZUE4 Bl1z00QZBQjEnqeJCak52ATvrZYJBzFhtUfjE= 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:mime-version :content-transfer-encoding; bh=pRy9rq5qs1Jktojwne/XAT46IRn8q5uLGfbapuM1rYs=; b=zFv4kjFGYFJArcOYEHSPY+sjAo370HWBK7j7YDOK/G56ZKitF6v8z+gWBEPW5fO424 JF7UYCy85XJ6A7q1PwpoVmB9bpWyPz+8aaNHVF91GWOf4UhRkLR8i6yz06H666CvaeWV 18ss6JJLG3NUQ7Xy6V+nrcVGUtHJnjZ40ShKBgeXNezXZpDb2sEgJb6BqwwfMBbcCFZl FSSJSGUf2Ysj2Z5KAyXX05J+6y0sIvELmmw0Qq63tTK5B/5IabqL5jP2BbMh1+K0W7ku rlqNpSKuc0JXEwFhUdqJmDqvdohz7azaBI25JPmH1gQfsFhNkUFHLmAJujQWrPZrePSM AAaQ== X-Gm-Message-State: AOAM531eAsje7n6FEgQ+fWNBuVTtaDLPK7q91QblMTEwtufN3e+OSZSs MjyNQcNlIP5eB0i3MxAw28pFIcJGd624UK9VNGsT5AohvQmny/fiOsy/Zhz3I++ta8s9qq8811R NlAe9HYzAifv3WYD8xOIPBLbOVL03RJFzDfJpJckjG/KvAp9qh67huE++0rGpAI+phTRzLfcD X-Google-Smtp-Source: ABdhPJzNrl2hV5Ef+pCOwiqFvxgoSrK4CSImKRnlnIroTKXK7OWbHuIBDzGfSHYVnpGL5Y/+x1DVBagxecWm X-Received: by 2002:a05:622a:1754:: with SMTP id l20mr344313qtk.309.1634133612522; Wed, 13 Oct 2021 07:00:12 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id d3sm1465537qkn.1.2021.10.13.07.00.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Oct 2021 07:00:12 -0700 (PDT) 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 17B34605247D; Wed, 13 Oct 2021 10:00:12 -0400 (EDT) From: ohilyard@iol.unh.edu To: ci@dpdk.org Cc: aconole@redhat.com, alialnu@nvidia.com, Owen Hilyard Date: Wed, 13 Oct 2021 10:00:07 -0400 Message-Id: <20211013140010.25400-1-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-ci] [PATCH v2 1/4] create_new_execution_file_from_tags: change tag argument 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 Sender: "ci" 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..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