Skip to content

Commit d2331f6

Browse files
author
Nejc Stebe
committed
take out ../ parent dir shorthands from the unit tests script path
1 parent 9383f14 commit d2331f6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

render_machine/actions/run_unit_tests.py

Lines changed: 7 additions & 3 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
@@ -15,12 +16,14 @@ class RunUnitTests(BaseAction):
1516
UNRECOVERABLE_ERROR_OUTCOME = "unrecoverable_error_occurred"
1617

1718
def execute(self, render_context: RenderContext, _previous_action_payload: Any | None):
19+
unittests_script = os.path.normpath(render_context.unittests_script)
20+
1821
if render_context.verbose:
1922
console.info(
20-
f"Running unit tests script {render_context.unittests_script}. (attempt: {render_context.unit_tests_running_context.fix_attempts + 1})"
23+
f"Running unit tests script {unittests_script}. (attempt: {render_context.unit_tests_running_context.fix_attempts + 1})"
2124
)
2225
exit_code, unittests_issue, unittests_temp_file_path = render_utils.execute_script(
23-
render_context.unittests_script,
26+
unittests_script,
2427
[render_context.build_folder],
2528
render_context.verbose,
2629
"Unit Tests",
@@ -35,12 +38,13 @@ def execute(self, render_context: RenderContext, _previous_action_payload: Any |
3538

3639
elif exit_code in UNRECOVERABLE_ERROR_EXIT_CODES:
3740
console.error(unittests_issue)
41+
3842
return (
3943
self.UNRECOVERABLE_ERROR_OUTCOME,
4044
RenderError.encode(
4145
message="Unit tests script failed due to problems in the environment setup. Please check your environment or update the script for running unittests.",
4246
error_type="ENVIRONMENT_ERROR",
43-
script=render_context.unittests_script,
47+
script=unittests_script,
4448
issue=unittests_issue,
4549
).to_payload(),
4650
)

0 commit comments

Comments
 (0)