add unit test stdout (error details) to renderFailed state#145
Conversation
pedjaradenkovic
left a comment
There was a problem hiding this comment.
As discussed, try to process the input run scripts paths so that it prints the clear absolute path (without relative parts)
render_machine/render_utils.py
Outdated
| stdout = "" | ||
| elapsed_time = time.time() - start_time | ||
|
|
||
| erase_display_pattern = re.compile(r"(?:\033\[[^a-zA-Z]*[a-zA-Z])*\033\[2J(?:\033\[[^a-zA-Z]*[a-zA-Z])*") |
There was a problem hiding this comment.
I suggest extracting this to a separate method with clear explanation what it does.
Also, probably good idea is to extract the regex pattern into a constant.
|
@pedjaradenkovic I did the requested changes then I remembered we probably want the same for the conformance tests. Please recheck. |
pedjaradenkovic
left a comment
There was a problem hiding this comment.
Great work 🚀
Before merging don't forget to squash the commits. Congrats on first solved ticket :D
render_machine/render_utils.py
Outdated
| proc.kill() | ||
|
|
||
|
|
||
| def sanitize_script_output(script_output: str) -> str: |
There was a problem hiding this comment.
Start it with _ to indicate is a private.
Thanks :) |
#95
This makes some small changes for the render failed screen:
clearcommand in the test scripts, only the output after the clearing will be shown in the render failed screen./a/b/../../c->/c)Before:

After (unit tests):

After (conformance tests):
