During test of the next branch, I've realized the AUTODIR
environment variable is not set on autoserv jobs, hence,
failing any server job. So, when AUTODIR is not set
(server side job), use the global_config.ini value of
autotest_top_path.

This fixes a bug that was preventing server side jobs to
work on next.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/shared/base_job.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/client/shared/base_job.py b/client/shared/base_job.py
index 5ef699a..3c1d290 100644
--- a/client/shared/base_job.py
+++ b/client/shared/base_job.py
@@ -1028,7 +1028,12 @@ class base_job(object):
         self._profdir = readonly_dir(self.clientdir, 'profilers')
         self._toolsdir = readonly_dir(self.clientdir, 'tools')
 
-        autodir = os.path.abspath(os.environ['AUTODIR'])
+        try:
+            autodir = os.path.abspath(os.environ['AUTODIR'])
+        except KeyError:
+            autodir = GLOBAL_CONFIG.get_config_value('COMMON',
+                                                     'autotest_top_path')
+
         tmpdir = os.path.join(autodir, 'tmp')
 
         tests_out_dir = GLOBAL_CONFIG.get_config_value('COMMON',
-- 
1.7.10.2

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to