summaryrefslogtreecommitdiff
path: root/test/daemon.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/daemon.py')
-rw-r--r--test/daemon.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/daemon.py b/test/daemon.py
index 37487a99..acfa4896 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -3051,10 +3051,20 @@ def gui_upgrades(old, new):
assert client.read(f'/pane/{text}/body') == b'one\ntwo\n'
assert alive(shell_pid) and ppid(shell_pid) == proc.pid and alive(sleeper)
wait_for('the window drawn again', lambda: frames[0].stat().st_mtime > mark)
- # The second, a client of the old build: let go and told to upgrade too.
- second.p.wait(timeout=30)
- said = second.err.read_bytes()
- assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:]
+ if knows_exec(old):
+ # The second, a client of a build that execs: the same process,
+ # on the build at its start path (upgrade_clients checks its
+ # view; here that it is carried and not let go).
+ wait_for('the second window on the new build', lambda: exe_of(second.pid) == (str(binary), True), timeout=30)
+ assert second.p.poll() is None
+ second.p.terminate()
+ second.p.wait(timeout=30)
+ else:
+ # The second, a client of a build before the exec: let go and
+ # told to upgrade too.
+ second.p.wait(timeout=30)
+ said = second.err.read_bytes()
+ assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:]
said = Replica(root / 'pardes-replica.sock').hello('win', semantics(new))
assert said == ('welcome', proc.pid, 'win'), said
os.kill(sleeper, signal.SIGTERM)