From 178c9a4afe8345fa18926a80fbc98de699133c9a Mon Sep 17 00:00:00 2001 From: bjs Date: Mon, 20 May 2024 10:31:28 +0000 Subject: [PATCH] (hw-results/tabular) add excludes on orphaned exceptions --- hw-results/exclude-exceptions.txt | 1 + hw-results/tabular.py | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 hw-results/exclude-exceptions.txt diff --git a/hw-results/exclude-exceptions.txt b/hw-results/exclude-exceptions.txt new file mode 100644 index 0000000..75dc2b7 --- /dev/null +++ b/hw-results/exclude-exceptions.txt @@ -0,0 +1 @@ +LB+R-svc-W+R-svc-W MP+W-svc-W+addr MP+W-svc-eret-W+addr MP+dmb+R-svc-R MP+dmb+R-svc-eret-R MP+dmb+svc-R-eret-R MP+dmb+svc-R-eret-svc-R MP+dmb+svc-R-svc-R MP+dmb+svc-R-svc-eret-R MP+dmb+svc2-R-eret-R MP+svc-W-eret-W+addr SB+W-svc-R+W-svc-R SB+svc-W-eret-R+svc-W-eret-R SB+svc-W-svc-eret-R+svc-W-svc-eret-R SB+svc2-W-eret-R+svc2-W-eret-R \ No newline at end of file diff --git a/hw-results/tabular.py b/hw-results/tabular.py index 019bc16..fdcea4b 100644 --- a/hw-results/tabular.py +++ b/hw-results/tabular.py @@ -9,6 +9,7 @@ [--macros] [--macros-file MACROS_FILE] [--file FILE | --device DEVICE] + [--devices DEVICES] [--excludes EXCLUDES] [--includes INCLUDES] options: @@ -20,7 +21,8 @@ --macros-file MACROS_FILE --herdtools --file FILE, -f FILE - --device DEVICE, -d DEVICE + --device DEVICE[ DEVICE DEVICE], -d DEVICE + --devices DEVICE DEVICE DEVICE --excludes EXCLUDES Comma-separated list of excluded groups, e.g. --excludes=@grp1,@grp2 --includes INCLUDES Comma-separated list of included groups, e.g. --includes=@grp1,@grp2 @@ -61,16 +63,17 @@ group = parser.add_mutually_exclusive_group() group.add_argument("--file", "-f", action="append") -group.add_argument("--device", "-d", action="append", type=pathlib.Path) +group.add_argument("--devices", nargs="+", type=pathlib.Path, default=()) +group.add_argument("--device", "-d", dest="devices", nargs="+", type=pathlib.Path) parser.add_argument( "--excludes", - action='append', + nargs="+", help="Comma-separated list of excluded groups, e.g. --excludes=@grp1,@grp2", ) parser.add_argument( "--includes", - action='append', + nargs="+", help="Comma-separated list of included groups, e.g. --includes=@grp1,@grp2", ) @@ -443,7 +446,7 @@ def filter_devices(grp_list, devices: "Mapping[Device, List[LogFileResult]]", in if (includes and not any(g in includes for g in groups)) or ( any(g in excludes for g in groups) - ): + ) or test_name in excludes: if print_skips: print("Skip ! {}".format(test_name)) @@ -817,8 +820,8 @@ def main(args): excludes = [e for e in excludes if e] devices = {} - if args.device: - for device_dir_path in args.device: + if args.devices: + for device_dir_path in args.devices: if not device_dir_path.is_dir(): raise ValueError( "-d accepts directories not files: {}".format(device_dir_path)