framework/replay: fix replay with single trace, without specifying device
commitef87faef075361cd17425512728dabf78f636579
authorDavid Heidelberg <david.heidelberg@collabora.com>
Mon, 9 May 2022 11:10:15 +0000 (9 13:10 +0200)
committerDavid Heidelberg <david.heidelberg@collabora.com>
Mon, 9 May 2022 13:56:57 +0000 (9 15:56 +0200)
tree8b7ea777f7e489e55156194c454d9f059f9d4cc2
parent1fc96325357b225f517cc35d874bbb9b2697281b
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>
framework/replay/compare_replay.py