ubuntu-server-iso-testing-dev team mailing list archive
-
ubuntu-server-iso-testing-dev team
-
Mailing list archive
-
Message #00186
[Merge] lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes into lp:ubuntu-server-iso-testing
James Page has proposed merging lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes into lp:ubuntu-server-iso-testing.
Requested reviews:
Ubuntu Server Iso Testing Developers (ubuntu-server-iso-testing-dev)
Related bugs:
Bug #953144 in ubuntu-server-iso-testing: "Post-reboot tests are not correctly injected into test-case"
https://bugs.launchpad.net/ubuntu-server-iso-testing/+bug/953144
For more details, see:
https://code.launchpad.net/~james-page/ubuntu-server-iso-testing/reboot-testing-fixes/+merge/97598
Fixup handling of errors on timeout of testing.
--
https://code.launchpad.net/~james-page/ubuntu-server-iso-testing/reboot-testing-fixes/+merge/97598
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~james-page/ubuntu-server-iso-testing/reboot-testing-fixes into lp:ubuntu-server-iso-testing.
=== modified file 'run-test.py'
--- run-test.py 2012-03-14 10:12:08 +0000
+++ run-test.py 2012-03-15 09:55:22 +0000
@@ -700,7 +700,7 @@
if not os.path.exists(testresultsdir):
os.makedirs(testresultsdir)
-if test['states'].has_key('tested'):
+if test['states'].has_key('tested') and test.has_key('results'):
# Testing appears to have completed - VM ran and run_tests
# execute and wrote to CouchDB
# Retrieve log output an place in hudson workspace
@@ -719,10 +719,10 @@
f.close()
test_completed = True
else:
- logging.debug("VM for test case %s powered off but tests not completed" % test['_id'])
+ logging.error("VM for test case %s powered off but tests not completed" % test['_id'])
-if test['states'].has_key('rebooted'):
- logging.debug("Test case %s rebooted." % test['_id'])
+if test['states'].has_key('rebooted') and test.has_key('post-reboot-results'):
+ logging.debug("Reboot tests completed for test case %s" % test['_id'])
post_reboot_results = test['post-reboot-results']
for test_result in post_reboot_results:
logging.debug("Storing results for test %s", test_result)
@@ -734,6 +734,8 @@
f = open (test_results_file, 'w')
f.write(test['post-reboot-results'][test_result]['script_stdout'])
f.close()
+elif test['states'].has_key('rebooted') and not test.has_key('post-reboot-results'):
+ logging.error("VM for test case %s rebooted but reboot tests not completed", test['_id'])
# save D-I logs no matter what (if they exist, of course)
if os.path.isfile(syslog_path):
Follow ups