Index: server/autotest.py |
diff --git a/server/autotest.py b/server/autotest.py |
index eb250952ba7bdd58d565ef230e54e5fd6342e684..74a76c724091ee970b82385518711b3ee0ab95ab 100644 |
--- a/server/autotest.py |
+++ b/server/autotest.py |
@@ -76,6 +76,7 @@ class BaseAutotest(installable_object.InstallableObject): |
try: |
autotest_binary = os.path.join(path, 'bin', 'autotest') |
host.run('test -x %s' % utils.sh_escape(autotest_binary)) |
+ host.run('test -w %s' % utils.sh_escape(path)) |
logging.debug('Found existing autodir at %s', path) |
return path |
except error.AutoservRunError: |
@@ -109,6 +110,7 @@ class BaseAutotest(installable_object.InstallableObject): |
for path in client_autodir_paths: |
try: |
host.run('mkdir -p %s' % utils.sh_escape(path)) |
+ host.run('test -w %s' % utils.sh_escape(path)) |
return path |
except error.AutoservRunError: |
logging.debug('Failed to create %s', path) |