From b86bc7b1edaa540faee7d6d0296a1ac63da4f70c Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Mon, 7 Aug 2023 15:05:33 -0700 Subject: [PATCH] tests: Add '--skip' arg to "download_check.py" This argument allows the passing of IDs of resources which should be skipped for this check. Note: A current limitation here is you cannot specify the version of a resource. Passing the ID of a resource to this will skip the downloading for all versions of that resource. Change-Id: Ifdb7c2b71553126fd52a3d286897ed5dd8e98f7c --- tests/gem5/gem5_resources/configs/download_check.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/gem5/gem5_resources/configs/download_check.py b/tests/gem5/gem5_resources/configs/download_check.py index 20081a46d5..7dc71908b1 100644 --- a/tests/gem5/gem5_resources/configs/download_check.py +++ b/tests/gem5/gem5_resources/configs/download_check.py @@ -52,6 +52,14 @@ parser.add_argument( "checked", ) +parser.add_argument( + "--skip", + nargs="+", # Accepts 1 or more arguments. + type=str, + help="The resource IDs to skip. If not set, no resources will be skipped.", + required=False, +) + parser.add_argument( "--gem5-version", type=str, @@ -86,6 +94,8 @@ if len(ids) == 0: errors = str() for id in ids: + if args.skip and id in args.skip: + continue if id not in resource_list: errors += ( f"Resource with ID '{id}' not found in "