Commit 91217f9c authored by sukolsak@chromium.org's avatar sukolsak@chromium.org

Run commands in the mini_installer test framework from the framework's directory.

The framework ran commands from the current working directory. Make it run commands from the framework's directory.

NOTRY=True 
BUG=264859
1) Uninstall Chrome (if it's installed.)
2) Build Chrome with Release mode and make sure that mini_installer.exe is created.
3) Go to src\chrome\test\mini_installer
4) Run "python test_installer.py config\config.config --build-dir=<build-dir> --target=Release" where <build-dir> is the path to main build directory (the parent of the Release directory). The test should pass.
5) Go to src\chrome\test
6) Run "python mini_installer\test_installer.py mini_installer\config\config.config --build-dir=<build-dir> --target=Release". The test should pass.

Review URL: https://chromiumcodereview.appspot.com/23557009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221361 0039d316-1c4b-4281-b951-d872f2087c98
parent 28ba238f
...@@ -106,11 +106,17 @@ class InstallerTest(unittest.TestCase): ...@@ -106,11 +106,17 @@ class InstallerTest(unittest.TestCase):
raise AssertionError("In state '%s', %s" % (state, e)) raise AssertionError("In state '%s', %s" % (state, e))
def _RunCommand(self, command): def _RunCommand(self, command):
exit_status = subprocess.call(self._path_resolver.ResolvePath(command), """Runs the given command from the current file's directory.
shell=True)
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: if exit_status != 0:
self.fail('Command %s returned non-zero exit status %s' % (command, self.fail('Command %s returned non-zero exit status %s' % (
exit_status)) resolved_command, exit_status))
def MergePropertyDictionaries(current_property, new_property): def MergePropertyDictionaries(current_property, new_property):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment