Risk: Medium
Visibility: Changes how status logs are written for tests which use
Autotest.run and pass in a results_dir different than the default.

Currently if you use Autotest.run to run a test and specify a results
directory, the status logs are not redirected for the duration of the
test, like all the other results are. This fixes that.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1596 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autotest.py b/server/autotest.py
index eb5ea4c..b789b69 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -379,12 +379,15 @@
 		redirector = server_job.client_logger(self.host.job)
 
 		try:
+			old_resultdir = self.host.job.resultdir
+			self.host.job.resultdir = self.results_dir
 			result = self.host.run(full_cmd, ignore_status=True,
 					       timeout=timeout,
 					       stdout_tee=client_log,
 					       stderr_tee=redirector)
 		finally:
 			redirector.close()
+			self.host.job.resultdir = old_resultdir
 
 		if result.exit_status == 1:
 			self.host.job.aborted = True