From 6a3fbb204b542e2b4d72908b0956fe5efa1d1f38 Mon Sep 17 00:00:00 2001 From: nrb <freifunk@nicoboehr.de> Date: Thu, 31 Dec 2020 23:05:22 +0100 Subject: [PATCH] fix: fail snapshot not always created --- ffs-updatetest.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ffs-updatetest.py b/ffs-updatetest.py index 48e5a39..3c3481a 100755 --- a/ffs-updatetest.py +++ b/ffs-updatetest.py @@ -139,9 +139,14 @@ with create_snapshot_context() as snapshot: logging.error("Not running the expected version, aborting") sys.exit(1) wait_for_gw_connection() - run_autoupdate() - if not assert_release(args.after_version): - logging.error("Not running the expected version after update, aborting") + try: + run_autoupdate() + wait_for_gw_connection() + if not assert_release(args.after_version): + logging.error("Not running the expected version after update, aborting") + raise ValueError("Not running the expected version after update, aborting") + except: + logging.error("Something seems to have failed, saving state and exiting.") create_snapshot(prefix="test_fail_{}".format(i)) sys.exit(1) restore_snapshot(snapshot) -- GitLab