Change verify to throw an error if it fails, and record things
correctly
Signed-off-by: Martin Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1188 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autoserv b/server/autoserv
index 401ace2..53b3cff 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -72,18 +72,24 @@
print "Invalid machine %s" % str(machine)
sys.exit(1)
-if repair:
- server_job.repair_machines(machines)
+# We have a control file unless it's just a verify/repair job
+if len(parser.args) > 0:
+ control = parser.args[0]
+else:
+ control = None
-if verify or repair:
- server_job.verify_machines(machines)
- sys.exit(0)
-
-job = server_job.server_job(parser.args[0], parser.args[1:], results, label,
+job = server_job.server_job(control, parser.args[1:], results, label,
user, machines, client)
job.stdout.tee_redirect(os.path.join(results, 'debug', 'autoserv.stdout'))
job.stderr.tee_redirect(os.path.join(results, 'debug', 'autoserv.stderr'))
+if repair:
+ job.repair()
+ sys.exit(0)
+elif verify:
+ job.verify()
+ sys.exit(0)
+
try:
job.run(reboot, install_before, install_after)
except: