diff options
author | David Heidelberg <david.heidelberg@collabora.com> | 2022-05-09 13:10:15 +0200 |
---|---|---|
committer | David Heidelberg <david.heidelberg@collabora.com> | 2022-05-09 15:56:57 +0200 |
commit | ef87faef075361cd17425512728dabf78f636579 (patch) | |
tree | 8b7ea777f7e489e55156194c454d9f059f9d4cc2 /framework | |
parent | 1fc96325357b225f517cc35d874bbb9b2697281b (diff) |
framework/replay: fix replay with single trace, without specifying device
Piglit crashes, when is run without device comparing single trace. It
shouldn't be needed.
f.e.
```
PIGLIT_SOURCE_DIR="../" ./replayer.py compare trace /home/projects/collabora/traces-db/0ad/0ad-v2.trace 0
```
should be valid, but does crash with:
```
...
File "/home/projects/collabora/piglit/replayer/../framework/replay/compare_replay.py", line 81, in _check_trace
dir_in_results = path.join('trace', OPTIONS.device_name, trace_dir)
File "/usr/lib/python3.10/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.10/genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
```
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/668>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/replay/compare_replay.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/replay/compare_replay.py b/framework/replay/compare_replay.py index 4cb523703..de74010f2 100644 --- a/framework/replay/compare_replay.py +++ b/framework/replay/compare_replay.py @@ -78,7 +78,7 @@ def _check_trace(trace_path, expected_checksum): json_result = {} trace_dir = path.dirname(trace_path) - dir_in_results = path.join('trace', OPTIONS.device_name, trace_dir) + dir_in_results = path.join('trace', OPTIONS.device_name or '', trace_dir) results_path = path.join(OPTIONS.results_path, dir_in_results) core.check_dir(results_path) |