Chromium Code Reviews| 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 e0614243b0ee51d3c5219d77e050f43e494f4bb3..a1ca4be38539334ff1b0263b28fae573fcc01220 100644 |
| --- a/chrome/test/mini_installer/test_installer.py |
| +++ b/chrome/test/mini_installer/test_installer.py |
| @@ -69,7 +69,7 @@ class InstallerTest(unittest.TestCase): |
| self.assertEqual(1, len(self._test) % 2, |
| 'The length of test array must be odd') |
| - # TODO(sukolsak): run a reset command that puts the machine in clean state. |
| + self._RunCleanCommand() |
| state = self._test[0] |
| self._VerifyState(state) |
| @@ -118,6 +118,19 @@ class InstallerTest(unittest.TestCase): |
| self.fail('Command %s returned non-zero exit status %s' % ( |
| resolved_command, exit_status)) |
| + def _RunCleanCommand(self): |
| + """Puts the machine in the clean state (i.e. Chrome not installed).""" |
| + # TODO(sukolsak): Read the clean state from the config file and clean |
| + # the machine according to it. |
|
robertshield
2013/09/10 20:59:31
Also, consider adding a TODO to handle SxS install
sukolsak
2013/09/10 21:26:29
Done.
|
| + command = ('python uninstall_chrome.py ' |
| + '--chrome-long-name="$CHROME_LONG_NAME" & ' |
|
robertshield
2013/09/10 20:59:31
Just to double check: it is my understanding that
sukolsak
2013/09/10 21:26:29
They will print an error message to stderr. For ex
|
| + 'python uninstall_chrome.py ' |
| + '--chrome-long-name="$CHROME_LONG_NAME" --system-level') |
| + resolved_command = self._path_resolver.ResolvePath(command) |
| + script_dir = os.path.dirname(os.path.abspath(__file__)) |
| + subprocess.call(resolved_command, shell=True, cwd=script_dir, |
| + stderr=open(os.devnull, 'w')) |
| + |
| def MergePropertyDictionaries(current_property, new_property): |
| """Merges the new property dictionary into the current property dictionary. |