Skip to content

Commit

Permalink
(hw-results/tabular) let devices have custom names
Browse files Browse the repository at this point in the history
  • Loading branch information
bensimner committed May 20, 2024
1 parent 66370f6 commit 89b321b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions hw-results/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@

@dataclasses.dataclass(frozen=True)
class Device:
name: "str"
path: pathlib.Path
name: str
dir: "str"

@dataclasses.dataclass
Expand Down Expand Up @@ -789,10 +790,16 @@ def main(args):
)

logs = collect_logs(device_dir_path)
d = Device(device_dir_path.stem, device_dir_path)

if (device_dir_path / "name.txt").exists():
name = (device_dir_path / "name.txt").read_text().rstrip()
else:
name = device_dir_path.stem

d = Device(device_dir_path, name, device_dir_path)
devices[d] = list(collect_all(d, logs))
elif args.file:
d = Device("all", ".")
d = Device(None, "all", ".")
devices[d] = list(collect_all(d, args.file))

with open(root.parent / "litmus" / "test_list.txt", "r") as f:
Expand Down

0 comments on commit 89b321b

Please sign in to comment.