Skip to content

Commit

Permalink
~
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Feb 26, 2024
1 parent cf1e485 commit c6da0bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions _AutoinstallCreator/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
_root_path: str = os.path.dirname(_self_path)
_tools_path: str = os.path.join(_root_path, '.tools')

busybox_exe_path = 'busybox'
busybox_exe_path: str = 'busybox'
update_script_name: str = 'update.sh'
if sys.platform.startswith('win'):
busybox_exe_path: str = os.path.join(_tools_path, 'busybox.exe')
busybox_exe_path = os.path.join(_tools_path, 'busybox.exe')
update_script_name = 'update.bat'

if _root_path not in sys.path:
sys.path.append(_root_path)
Expand Down Expand Up @@ -71,7 +73,7 @@ def test_update_to_new_version(self):
io_tools.write_text(os.path.join(_self_tmp_path, self.test_old_version, '_AutoinstallCreator', 'version.txt'),
self.test_old_version)

result = subprocess.run([os.path.join(_self_tmp_path, self.test_old_version, 'update.bat')],
result = subprocess.run([os.path.join(_self_tmp_path, self.test_old_version, update_script_name)],
env={
**os.environ,
'MOCK_AUTOINSTALLCREATOR_VERSION_BODY': self.version_str,
Expand Down

0 comments on commit c6da0bc

Please sign in to comment.