Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2282)

Unified Diff: server/autotest.py

Issue 5867003: Remount autodir after reboot. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | server/autotest_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « no previous file | server/autotest_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698