Skip to content

Commit

Permalink
'gnome-terminal', '--wait'
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Mar 1, 2024
1 parent 4b19133 commit 80366b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _AutoinstallCreator/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def setUpClass(cls) -> None:
pathlib.Path(_self_body_path).unlink(missing_ok=True)

if not sys.platform.startswith('win'):
if shutil.which('xterm'):
busybox_exe_path_arg = ['xterm', '-e']
if shutil.which('gnome-terminal'):
busybox_exe_path_arg = ['gnome-terminal', '--wait', '--']

subprocess.run(busybox_exe_path_arg + [os.path.join(_self_path, 'release.sh')],
check=True)
Expand All @@ -69,7 +69,6 @@ def setUp(self):
pathlib.Path(self.old_update_log_filepath).unlink(missing_ok=True)
pathlib.Path(self.update_log_filepath).unlink(missing_ok=True)


def test_version_up_to_date(self):
subprocess.run(busybox_exe_path_arg + [self.package_filepath],
cwd=_self_tmp_path,
Expand All @@ -86,7 +85,8 @@ def test_version_up_to_date(self):

def test_update_to_new_version(self):
subprocess.run(busybox_exe_path_arg + [self.package_filepath, '--target', self.test_old_version],
cwd=_self_tmp_path)
cwd=_self_tmp_path,
check=True)

io_tools.write_text(os.path.join(_self_tmp_path, self.test_old_version, '_AutoinstallCreator', 'version.txt'),
self.test_old_version)
Expand Down

0 comments on commit 80366b7

Please sign in to comment.