create download directory at job start v2
Ensure that the download directory exists in the tests directory when the
job starts. Remove any existing downloads.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@683 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/job.py b/client/bin/job.py
index 47c8563..d77991c 100755
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -70,6 +70,11 @@
if not os.path.exists(self.autodir + '/results'):
os.mkdir(self.autodir + '/results')
+ download = os.path.join(self.testdir, 'download')
+ if os.path.exists(download):
+ system('rm -rf ' + download)
+ os.mkdir(download)
+
if os.path.exists(self.resultdir):
system('rm -rf ' + self.resultdir)
os.mkdir(self.resultdir)