Skip to content

Commit cfcd99f

Browse files
author
Nejc Stebe
committed
improve error screen for failed conformance tests too
1 parent d2331f6 commit cfcd99f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

render_machine/actions/run_conformance_tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from typing import Any
23

34
import render_machine.render_utils as render_utils
@@ -16,6 +17,8 @@ class RunConformanceTests(BaseAction):
1617
UNRECOVERABLE_ERROR_OUTCOME = "unrecoverable_error_occurred"
1718

1819
def execute(self, render_context: RenderContext, _previous_action_payload: Any | None):
20+
conformance_tests_script = os.path.normpath(render_context.conformance_tests_script)
21+
1922
if render_context.module_name == render_context.conformance_tests_running_context.current_testing_module_name:
2023
conformance_tests_folder_name = (
2124
render_context.conformance_tests_running_context.get_current_conformance_test_folder_name()
@@ -32,14 +35,14 @@ def execute(self, render_context: RenderContext, _previous_action_payload: Any |
3235

3336
if render_context.verbose:
3437
console.info(
35-
f"Running conformance tests script {render_context.conformance_tests_script} "
38+
f"Running conformance tests script {conformance_tests_script} "
3639
+ f"for {conformance_tests_folder_name} ("
3740
+ f"functionality {render_context.conformance_tests_running_context.current_testing_frid} "
3841
+ f"in module {render_context.conformance_tests_running_context.current_testing_module_name}"
3942
+ ")."
4043
)
4144
exit_code, conformance_tests_issue, conformance_tests_temp_file_path = render_utils.execute_script(
42-
render_context.conformance_tests_script,
45+
conformance_tests_script,
4346
[render_context.build_folder, conformance_tests_folder_name],
4447
render_context.verbose,
4548
"Conformance Tests",
@@ -72,9 +75,9 @@ def execute(self, render_context: RenderContext, _previous_action_payload: Any |
7275
RenderError.encode(
7376
message=conformance_tests_issue,
7477
error_type="ENVIRONMENT_ERROR",
75-
exit_code=exit_code,
76-
script=render_context.conformance_tests_script,
78+
script=conformance_tests_script,
7779
frid=render_context.conformance_tests_running_context.current_testing_frid,
80+
issue=conformance_tests_issue,
7881
).to_payload(),
7982
)
8083

0 commit comments

Comments
 (0)