Add a formal cleanup phase to the scheduler flow.
-add a --cleanup or -C option to autoserv, which runs a new control segment, cleanup. this option and control segment obsolete the old -b option and reboot_segment control segment.
-change the RebootTask in the scheduler into a more generic CleanupTask, which calls autoserv --cleanup.
-change the host status "Rebooting" to "Cleaning"
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2377 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autoserv b/server/autoserv
index 721443f..47b068d 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -75,11 +75,11 @@
user = parser.options.user
client = parser.options.client
server = parser.options.server
- reboot = parser.options.reboot
install_before = parser.options.install_before
install_after = parser.options.install_after
verify = parser.options.verify
repair = parser.options.repair
+ cleanup = parser.options.cleanup
no_tee = parser.options.no_tee
parse_job = parser.options.parse_job
host_protection = parser.options.host_protection
@@ -92,11 +92,11 @@
print "Can not specify a test as both server and client!"
sys.exit(1)
- if len(parser.args) < 1 and not verify and not repair:
+ if len(parser.args) < 1 and not (verify or repair or cleanup):
print parser.parser.print_help()
sys.exit(1)
- # We have a control file unless it's just a verify/repair job
+ # We have a control file unless it's just a verify/repair/cleanup job
if len(parser.args) > 0:
control = parser.args[0]
else:
@@ -145,7 +145,7 @@
job.verify()
else:
try:
- job.run(reboot, install_before, install_after)
+ job.run(cleanup, install_before, install_after)
finally:
job.cleanup_parser()
except: