From: Victor Toso <me@xxxxxxxxxxxxxx> Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> --- tests/migrate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/migrate.py b/tests/migrate.py index fcf51bdb..e83a6159 100755 --- a/tests/migrate.py +++ b/tests/migrate.py @@ -62,6 +62,8 @@ def get_args(): help="Append options for agent's virtserialport") parser.add_argument('--wait-to-start', dest="wait_user_input", action='store_true', default=False, help="Wait user's input to start migration test") + parser.add_argument('--count', dest='counter', type=int, default=100, + help="Number of migrations to run (set 0 for infinite)") args = parser.parse_args(sys.argv[1:]) if os.path.exists(args.qemu): args.qemu_exec = args.qemu @@ -215,8 +217,10 @@ def main(): migration_port=args.migrate_port, spice_ports=[args.spice_port1, args.spice_port2], vdagent=args.vdagent) atexit.register(cleanup, migrator) - while True: + counter = 0 + while args.counter == 0 or counter < args.counter: migrator.iterate(args.wait_user_input) + counter += 1 if __name__ == '__main__': main() -- 2.21.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel