diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-09-11 09:30:02 +0100 |
---|---|---|
committer | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-09-11 11:08:47 +0100 |
commit | 76c6a556c7396ee6468780b57676e5821c55b1e4 (patch) | |
tree | b3f0e8de1d9aa6ea925e44cfcfdc3a029dacd336 /scripts/convert2conformance/convert2conformance.py | |
parent | a8098c06885e6fb5ce3239830e1cd344c98262a4 (diff) | |
download | reference_model-76c6a556c7396ee6468780b57676e5821c55b1e4.tar.gz |
Fixes for conformance generator tags and test selection
Incorrectly used "tag" in test.desc instead of "tags"
Incorrectly selected all tests rather than just all positive
tests depending on operator selection option.
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: Ib257bc57accf745beedfa4a3b2ece9539c0972c2
Diffstat (limited to 'scripts/convert2conformance/convert2conformance.py')
-rwxr-xr-x | scripts/convert2conformance/convert2conformance.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/convert2conformance/convert2conformance.py b/scripts/convert2conformance/convert2conformance.py index f915070..555cb50 100755 --- a/scripts/convert2conformance/convert2conformance.py +++ b/scripts/convert2conformance/convert2conformance.py @@ -83,10 +83,10 @@ def parse_args(argv): ) parser.add_argument( "--tag", - dest="tag", + dest="tags", action="append", type=str, - help="Optional string tag mark this test with. May be repeated", + help="Optional string tag to mark this test with. May be repeated", ) parser.add_argument( "--strict", @@ -218,7 +218,7 @@ def update_desc_json( # Add tags (if any) if tags is not None: - test_desc["tag"] = tags + test_desc["tags"] = tags return test_desc @@ -355,14 +355,18 @@ def main(argv=None): output_dir=args.output_dir, create_result=(not args.lazy_data_generation), profiles=args.profile, - tags=args.tag, + tags=args.tags, ) if not test_desc: # Error from conversion/update return 1 # Validate the desc.json schema - TestDescSchemaValidator().validate_config(test_desc) + try: + TestDescSchemaValidator().validate_config(test_desc) + except Exception as e: + logger.error(e) + return 1 # Output new desc.json new_desc_filename = args.output_dir / NAME_DESC_FILENAME |