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 5B6A2A0548 for ; Fri, 24 Sep 2021 18:05:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 533E541305; Fri, 24 Sep 2021 18:05:31 +0200 (CEST) Received: from mail-oi1-f225.google.com (mail-oi1-f225.google.com [209.85.167.225]) by mails.dpdk.org (Postfix) with ESMTP id B3DF5412F8 for ; Fri, 24 Sep 2021 18:05:29 +0200 (CEST) Received: by mail-oi1-f225.google.com with SMTP id s24so12474094oij.8 for ; Fri, 24 Sep 2021 09:05:29 -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=JJ5FER0lYXCQ1rAL/0BT26xET9bbdXrkhJxcbyMw+3A=; b=Qm5KdNfsvqhKQk5qY67ECm+ZY7gD4HOiBN/WKWqolSRzu0uTD0epU5bnNONoDNiVd8 a3brQkSA8KmMbN51Tv5zHFERu7WLFQytmsjU9fP54unSjxf2y7fJZPyGD7FTcTvgEZ9Q 87pUkZ/GI5JRW4Xg5LlrLvAzu+9pc0FvCiHhg= 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=JJ5FER0lYXCQ1rAL/0BT26xET9bbdXrkhJxcbyMw+3A=; b=OBlLZ+PQOjWOVZRNEBkquKw0bYi0gucpHHNZqAR66mZP/IcSYzbIkZFFN3Ne3Q40dz N0dQtFK6ixChkIl85/MC7QhxFY7iCH2jIdnHaBKU6DPEn7/lWF4ylns2EkE38wjf+h6X 5gDFKhq0Ge1MnGMN/10vYRI/mkCUpuN3jsZEm1+C1nr0ogPt/8DBBfV9clnVUruo1fv4 pX/Ay5xrqZ9I0+X/1S/uW5q7MMuhLJDrOEOQ0bR9JWdaCQngbFM9+Vp7GTh/DAGgAnwb tqU/hNbBgJwaByKylwqJ1xMR5TlQ8PQdmeA7bX9x7m/fq5dIMxzWKuXlrktZ0AwosEuE rbfw== X-Gm-Message-State: AOAM531PyefIiYpM+Xd1FQFuOMitvvV8N3P4w3yF1v8BTh7ohIeMbiRr YqYFh4mTSnRYWsPOTQey0khCOeEBExdVy4bgf3h3jopGGSSodjWBg9YvM/OjIZl20mffgfar7AJ Yi1klYC1bI0Ai4Ldw+PSzOIx1kaMKqPwoVAL7++o4A8yCJ1nW9gK+C95t0FqdoOubeZJYQIzt X-Google-Smtp-Source: ABdhPJxXy8Xgz5wI4xsZ1YLVZ8Ttvwo5HsROWSQdZIzOGvGzklAEIwBuOUGBXqSOsgRvWMhpn1Gw0rWVneS1 X-Received: by 2002:a05:6808:180a:: with SMTP id bh10mr2169368oib.6.1632499528939; Fri, 24 Sep 2021 09:05:28 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id c21sm3097644ooj.5.2021.09.24.09.05.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Sep 2021 09:05:28 -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 42487605247D; Fri, 24 Sep 2021 12:05:28 -0400 (EDT) From: ohilyard@iol.unh.edu To: ci@dpdk.org Cc: aconole@redhat.com, Owen Hilyard Date: Fri, 24 Sep 2021 12:05:26 -0400 Message-Id: <20210924160527.45602-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 1/2] create_new_execution_file_from_tags: add test specifier 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, the tags syntax needed to be redone when the ability to specify individual tests was added. As such, the syntax has gone from "--tags core documentation" to "--tag core --tag documentation". This is because argparse does not allow multiple greedy variadic arguments in all versions. added syntax to force adding a specific test syntax: "--test nic_single_core_perf --test hello_world" This flag was added to help facilitate periodic testing. The list of tests in the template file will be ignored by this argument. This allows a more automated way to run tests which should not be run under normal circumstances, such as rte_flow, which is lightly supported in many NICs. Signed-off-by: Owen Hilyard --- tools/create_new_execution_file_from_tags.py | 19 ++++++++++++++++--- 1 file changed, 16 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..61d801d 100755 --- a/tools/create_new_execution_file_from_tags.py +++ b/tools/create_new_execution_file_from_tags.py @@ -73,7 +73,10 @@ 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.') + 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 @@ 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 +103,15 @@ 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 != ''] + + 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