From: Shaun Ruffell <[email protected]>

Use the testdir member variable.  Use the download directory as the
import directory since the group is appended to modulename.  Create
the 'download' directory if it's not there.

Signed-off-by: Shaun Ruffell <[email protected]>
---
 client/common_lib/test.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/common_lib/test.py b/client/common_lib/test.py
index ccbc097..45783a7 100644
--- a/client/common_lib/test.py
+++ b/client/common_lib/test.py
@@ -562,7 +562,7 @@ def _installtest(job, url):
     # an empty  __init__.py so that sub-directories are
     # considered for import.
     if not os.path.exists(group_dir):
-        os.mkdir(group_dir)
+        os.makedirs(group_dir)
         f = file(os.path.join(group_dir, '__init__.py'), 'w+')
         f.close()
 
@@ -617,7 +617,7 @@ def runtest(job, url, tag, args, dargs,
     if url.endswith('.tar.bz2'):
         (testgroup, testname) = _installtest(job, url)
         bindir = os.path.join(job.testdir, 'download', testgroup, testname)
-        importdir = os.path.join(testdir, 'download', testgroup)
+        importdir = os.path.join(job.testdir, 'download')
         site_bindir = None
         modulename = '%s.%s' % (re.sub('/', '.', testgroup), testname)
         classname = '%s.%s' % (modulename, testname)
-- 
1.7.1.86.g0e460

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

Reply via email to