diff options
Diffstat (limited to 'test/daemon.py')
| -rw-r--r-- | test/daemon.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/daemon.py b/test/daemon.py index 88e11062..49e9ff99 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -3277,6 +3277,12 @@ def upgrades(old, new): shutil.rmtree(root, ignore_errors=True) +def knows_size(gui_binary): + """Whether a build's window exec'd at an Upgrade comes back the size + it had (PARDES_JOIN_SIZE: client.zig `execAgain`).""" + return b'PARDES_JOIN_SIZE' in Path(gui_binary).read_bytes() + + def knows_exec(binary): """Whether a build's client execs the build at its start path at an Upgrade, for the view it is handed (PARDES_JOIN_VIEW).""" @@ -3507,7 +3513,10 @@ if __name__ == '__main__': if all(a.with_name('pardes-gui').exists() for a in (old, new)): upgrade_clients(old, new) if knows_exec(old): - pair_window_geometry(old.with_name('pardes-gui'), new.with_name('pardes-gui')) + if knows_size(old.with_name('pardes-gui')): + pair_window_geometry(old.with_name('pardes-gui'), new.with_name('pardes-gui')) + else: + print('pair window geometry: skipped: the old build\'s window passes no size at its exec (no PARDES_JOIN_SIZE)') elif sys.argv[1:2] == ['--upgrade-clients']: upgrade_clients(Path(sys.argv[2]).resolve(), Path(sys.argv[3]).resolve()) elif sys.argv[1:2] == ['--clients']: |
