Index: server/autotest.py |
diff --git a/server/autotest.py b/server/autotest.py |
index 63d652e7a779250c9fe86922cc1a59b76bf2e5a4..d7700f16cf6bc577584091df6bd48eee3d15f44e 100644 |
--- a/server/autotest.py |
+++ b/server/autotest.py |
@@ -76,6 +76,15 @@ class BaseAutotest(installable_object.InstallableObject): |
autodir = host.get_autodir() |
if autodir: |
logging.debug('Using existing host autodir: %s', autodir) |
+ # We have an autodir, make sure it's mounted. |
+ result = host.run('mount | grep -q ' + autodir, ignore_status=True) |
+ if result.exit_status != 0: |
+ # Attempt to remount if it isn't. |
+ client_autodir_real_path = utils.sh_escape( |
+ cls.get_client_autodir_real_path(host)) |
+ host.run('mount --bind %s %s' % (client_autodir_real_path, |
+ autodir)) |
+ host.run('mount -o remount,exec ' + autodir) |
ericli
2010/12/17 04:24:18
could you consolidate this logic with _find_instal
DaleCurtis
2010/12/17 17:46:07
I can do this, but I'll have to add a new @classme
ericli
2010/12/17 18:02:48
I see, I also recalled _find_installable_dir() wor
|
return autodir |
for path in Autotest.get_client_autodir_paths(host): |