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

Unified Diff: chrome/test/mini_installer/test_installer.py

Issue 23557009: Run commands in the mini_installer test framework from the framework's directory. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address robertshield's comment. Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer/test_installer.py
diff --git a/chrome/test/mini_installer/test_installer.py b/chrome/test/mini_installer/test_installer.py
index ea0aeb69c0ad052fb4c3d1d59e80b3d197749b15..e0614243b0ee51d3c5219d77e050f43e494f4bb3 100644
--- a/chrome/test/mini_installer/test_installer.py
+++ b/chrome/test/mini_installer/test_installer.py
@@ -106,11 +106,17 @@ class InstallerTest(unittest.TestCase):
raise AssertionError("In state '%s', %s" % (state, e))
def _RunCommand(self, command):
- exit_status = subprocess.call(self._path_resolver.ResolvePath(command),
- shell=True)
+ """Runs the given command from the current file's directory.
+
+ Args:
+ command: A command to run. It is expanded using ResolvePath.
+ """
+ resolved_command = self._path_resolver.ResolvePath(command)
+ script_dir = os.path.dirname(os.path.abspath(__file__))
+ exit_status = subprocess.call(resolved_command, shell=True, cwd=script_dir)
if exit_status != 0:
- self.fail('Command %s returned non-zero exit status %s' % (command,
- exit_status))
+ self.fail('Command %s returned non-zero exit status %s' % (
+ resolved_command, exit_status))
def MergePropertyDictionaries(current_property, new_property):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698