From 78ead2fbe53256d308ac7f9a2b22220767b1a598 Mon Sep 17 00:00:00 2001 From: colby-nyce Date: Fri, 13 Dec 2024 13:53:53 -0600 Subject: [PATCH] Add option to trim down the arch tests (#27) Co-authored-by: Colby Nyce --- scripts/RunRiscVArchTest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/RunRiscVArchTest.py b/scripts/RunRiscVArchTest.py index 2fac93c..85072f1 100755 --- a/scripts/RunRiscVArchTest.py +++ b/scripts/RunRiscVArchTest.py @@ -22,8 +22,13 @@ def main(): parser = argparse.ArgumentParser(description="Script to run the RISC-V architecture tests on Atlas") parser.add_argument("xlen", type=str, choices=['rv32', 'rv64'], help="The XLEN value (rv32 or rv64)") parser.add_argument("directory", type=str, help="The directory of the built RISC-V architecture tests i.e. riscv-tests/isa") + parser.add_argument("--extensions", type=str, nargs="+", help="The extensions to test (mi, si, ui, um, ua, uf, ud)") args = parser.parse_args() + if args.extensions: + assert [ext in SUPPORTED_EXTENSIONS for ext in args.extensions], "Unsupported extension(s) provided" + SUPPORTED_EXTENSIONS = args.extensions + tests = get_tests(args.directory) if args.xlen == "rv32": tests = [test for test in tests if "rv32" in test]