[spice 6/8] tests: migrate: bool instead of on/off option in cmd line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

Simpler. Make the default to be False as well as
 1) No args should run as simple as possible
 2) True is currently broken

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 tests/migrate.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/migrate.py b/tests/migrate.py
index 31593c8a..4ac6289b 100755
--- a/tests/migrate.py
+++ b/tests/migrate.py
@@ -58,7 +58,8 @@ def get_args():
     parser.add_argument('--log_filename', dest='log_filename', default='migrate.log')
     parser.add_argument('--image', dest='image', default='')
     parser.add_argument('--client', dest='client', default='spicy', choices=['spicy', 'remote-viewer'])
-    parser.add_argument('--vdagent', choices=['on', 'off'], default='on')
+    parser.add_argument('--vdagent', dest="vdagent", action='store_true', default=False,
+                        help="Append options for agent's virtserialport")
     args = parser.parse_args(sys.argv[1:])
     if os.path.exists(args.qemu):
         args.qemu_exec = args.qemu
@@ -210,7 +211,7 @@ def main():
     migrator = Migrator(client=args.client, qemu_exec=args.qemu_exec,
         image=args.image, log=log, monitor_files=[args.qmp1, args.qmp2],
         migration_port=args.migrate_port, spice_ports=[args.spice_port1,
-        args.spice_port2], vdagent=(args.vdagent=='on'))
+        args.spice_port2], vdagent=args.vdagent)
     atexit.register(cleanup, migrator)
     while True:
         migrator.iterate()
-- 
2.21.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]