Fix bug in repair and verify with parallel_simple

Verify and repair are writing their results out in the current dir
instead of the results directory. I suspect that never used to matter,
as they were often the same, but now it does.

Steve - please confirm this won't break the scheduler's usage?

Signed-off-by: Martin Bligh <[email protected]>




git-svn-id: http://test.kernel.org/svn/autotest/trunk@2516 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index 26e5af5..df944a0 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -233,6 +233,8 @@
     def verify(self):
         if not self.machines:
             raise error.AutoservError('No machines specified to verify')
+        if self.resultdir:
+            os.chdir(self.resultdir)
         try:
             namespace = {'machines' : self.machines, 'job' : self,
                          'ssh_user' : self.ssh_user,
@@ -248,6 +250,8 @@
     def repair(self, host_protection):
         if not self.machines:
             raise error.AutoservError('No machines specified to repair')
+        if self.resultdir:
+            os.chdir(self.resultdir)
         namespace = {'machines': self.machines, 'job': self,
                      'ssh_user': self.ssh_user, 'ssh_port': self.ssh_port,
                      'ssh_pass': self.ssh_pass,