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

Unified Diff: tests/lab/runner_util.py

Issue 332030: Adjusted timeouts for a couple failing tests; switched from umount to hdiutil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 2 months 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 | tests/lab/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lab/runner_util.py
===================================================================
--- tests/lab/runner_util.py (revision 29792)
+++ tests/lab/runner_util.py (working copy)
@@ -38,7 +38,6 @@
import subprocess
import shutil
import sys
-import time
import runner_constants as const
import util
@@ -86,15 +85,41 @@
def InstallO3DPlugin():
"""Installs O3D plugin."""
+ logging.info('Installing plugin...')
if util.IsWindows():
installer_path = os.path.join(const.PRODUCT_DIR_PATH, 'o3d.msi')
+
+ if not os.path.exists(installer_path):
+ logging.error('Installer path not found, %s' % installer_path)
+ return False
+
+ install_command = 'msiexec.exe /i "%s"' % installer_path
+ if util.RunStr(install_command) != 0:
+ return False
+
elif util.IsMac():
dmg_path = os.path.join(const.PRODUCT_DIR_PATH, 'o3d.dmg')
- volumes_path = util.MountDiskImage(dmg_path)
- if volumes_path is None:
+ mnt = util.MountDiskImage(dmg_path)
+ if mnt is None:
return False
- else:
- installer_path = os.path.join(volumes_path, 'O3D.mpkg')
+ (device, volumes_path) = mnt
+
+ installer_path = os.path.join(volumes_path, 'O3D.mpkg')
+
+ if not os.path.exists(installer_path):
+ logging.error('Installer path not found, %s' % installer_path)
+ util.UnmountDiskImage(device)
+ return False
+
+ admin_password = 'g00gl3'
+ install_command = ('echo %s | sudo -S /usr/sbin/installer -pkg '
+ '"%s" -target /' % (admin_password, installer_path))
+
+ ret_code = util.RunStr(install_command)
+ util.UnmountDiskImage(device)
+ if ret_code != 0:
+ return False
+
else:
plugin_path = os.path.join(const.PRODUCT_DIR_PATH, 'libnpo3dautoplugin.so')
plugin_dst_dir = os.path.expanduser('~/.mozilla/plugins')
@@ -107,29 +132,6 @@
shutil.copyfile(plugin_path, plugin_dst)
return True
- logging.info('Installing plugin:"%s"', installer_path)
-
- if not os.path.exists(installer_path):
- logging.error('Installer path not found, %s' % installer_path)
- return False
-
- if util.IsWindows():
- install_command = 'msiexec.exe /i "%s"' % installer_path
- elif util.IsMac():
- admin_password = 'g00gl3'
- install_command = ('echo %s | sudo -S /usr/sbin/installer -pkg '
- '"%s" -target /' % (admin_password, installer_path))
-
- logging.info('Installing...')
- result = os.system(install_command)
- if result:
- logging.error('Install failed.')
- return False
- logging.info('Installed.')
-
- if util.IsMac():
- util.UnmountDiskImage(volumes_path)
-
return True
def UninstallO3DPlugin():
« no previous file with comments | « no previous file | tests/lab/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698