Mercurial > dropbear
diff test/test_dropbear.py @ 1870:0dcc5b0d93fa
Make re-exec work with "dropbearmulti dropbear"
The re-exec needs to know to use the dropbearmulti binary instead.
Add a test for this case.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 01 Feb 2022 22:18:23 +0800 |
parents | 49ce974c3215 |
children | 81991ded740f |
line wrap: on
line diff
--- a/test/test_dropbear.py Tue Feb 01 22:12:25 2022 +0800 +++ b/test/test_dropbear.py Tue Feb 01 22:18:23 2022 +0800 @@ -19,7 +19,8 @@ yield None return - args = [opt.dropbear, + # split so that "dropbearmulti dropbear" works + args = opt.dropbear.split() + [ "-p", LOCALADDR, # bind locally only "-r", opt.hostkey, "-p", opt.port, @@ -43,9 +44,10 @@ def dbclient(request, *args, **kwargs): opt = request.config.option host = opt.remote or LOCALADDR - base_args = [opt.dbclient, "-y", host, "-p", opt.port] + # split so that "dropbearmulti dbclient" works + base_args = opt.dbclient.split() + ["-y", host, "-p", opt.port] if opt.user: - full_args.extend(['-l', opt.user]) + base_args.extend(['-l', opt.user]) full_args = base_args + list(args) bg = kwargs.get("background") if "background" in kwargs: