From cf1e485bbb8cd61a92d5b706f1879f3ec80054ef Mon Sep 17 00:00:00 2001 From: Reshetnikov_AS Date: Tue, 27 Feb 2024 00:32:17 +0400 Subject: [PATCH] busybox_exe_path --- _AutoinstallCreator/test_update.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/_AutoinstallCreator/test_update.py b/_AutoinstallCreator/test_update.py index 4ac2b1db..469e49c4 100644 --- a/_AutoinstallCreator/test_update.py +++ b/_AutoinstallCreator/test_update.py @@ -5,13 +5,15 @@ import sys import unittest - _self_path: str = os.path.dirname(os.path.realpath(__file__)) _self_tmp_path: str = os.path.join(_self_path, '.tmp') _root_path: str = os.path.dirname(_self_path) _tools_path: str = os.path.join(_root_path, '.tools') -busybox_exe_path: str = os.path.join(_tools_path, 'busybox.exe') + +busybox_exe_path = 'busybox' +if sys.platform.startswith('win'): + busybox_exe_path: str = os.path.join(_tools_path, 'busybox.exe') if _root_path not in sys.path: sys.path.append(_root_path) @@ -81,7 +83,7 @@ def test_update_to_new_version(self): update_log_filepath = os.path.join(_self_tmp_path, self.test_old_version, '_update.log') self.assertTrue(io_tools.wait_for(lambda: update_completed(update_log_filepath, self.version_str), - err_message='Update failed', - timeout=10, - retry_timeout=0.5, - exception=OSError)) + err_message='Update failed', + timeout=10, + retry_timeout=0.5, + exception=OSError))