chrome/test/mini_installer/installer_test.py
def tearDown(self):
        """Cleans up the machine if the test case fails."""
        if self._clean_on_teardown:
            # The last state in the test's traversal is its "clean" state, so
            # use it to drive the cleanup operation.
            clean_state_name = self._test[len(self._test) - 1]
            RunCleanCommand(True,
                            InstallerTest._config.states[clean_state_name],
                            InstallerTest._variable_expander)
            # Either copy the log to isolated outdir or dump it to console.
            if InstallerTest._output_dir:
                target = os.path.join(InstallerTest._output_dir,
                                      os.path.basename(self._log_path))
                shutil.copyfile(self._log_path, target)
                LOGGER.error('Saved installer log to %s', target)
            else:
                with open(self._log_path) as fh:
                    LOGGER.error(fh.read())
Cleans up the machine if the test case fails.
Cleans up the machine if the test case fails.
Cleans up the machine if the test case fails .
def tearDown(self):
        if self._clean_on_teardown:
            clean_state_name = self._test[len(self._test) - 1]
            RunCleanCommand(True,
                            InstallerTest._config.states[clean_state_name],
                            InstallerTest._variable_expander)
            if InstallerTest._output_dir:
                target = os.path.join(InstallerTest._output_dir,
                                      os.path.basename(self._log_path))
                shutil.copyfile(self._log_path, target)
                LOGGER.error('Saved installer log to %s', target)
            else:
                with open(self._log_path) as fh:
                    LOGGER.error(fh.read())
def tearDown ( self ) : if self . _clean_on_teardown : clean_state_name = self . _test [ len ( self . _test ) - 1 ] RunCleanCommand ( True , InstallerTest . _config . states [ clean_state_name ] , InstallerTest . _variable_expander ) if InstallerTest . _output_dir : target = os . path . join ( InstallerTest . _output_dir , os . path . basename ( self . _log_path ) ) shutil . copyfile ( self . _log_path , target ) LOGGER . error ( 'Saved installer log to %s' , target ) else : with open ( self . _log_path ) as fh : LOGGER . error ( fh . read ( ) )
Cleans up the machine if the test case fails.
Cleans up the machine if the test case fails .
"""Cleans up the machine if the test case fails.""" # The last state in the test's traversal is its "clean" state, so # use it to drive the cleanup operation. # Either copy the log to isolated outdir or dump it to console.
self