Exemple #1
0
 def test_default_configuration__scripterror(self):
     # We run webkit-build-directory to find out where the default
     # configuration file is. See what happens if that script fails.
     # (We should get the default value, 'Release').
     c = self.make_config(exception=executive.ScriptError())
     actual = c.default_configuration()
     self.assertEqual(actual, 'Release')
Exemple #2
0
    def check_sys_deps(self, needs_http):
        cmd = [self._path_to_driver(), '--check-layout-test-sys-deps']

        local_error = executive.ScriptError()

        def error_handler(script_error):
            local_error.exit_code = script_error.exit_code

        output = self._executive.run_command(cmd, error_handler=error_handler)
        if local_error.exit_code:
            _log.error('System dependencies check failed.')
            _log.error('To override, invoke with --nocheck-sys-deps')
            _log.error('')
            _log.error(output)
            return False
        return True
 def run_command(self,
                 arg_list,
                 error_handler=None,
                 return_exit_code=False,
                 decode_output=False,
                 return_stderr=False):
     if self._exception:
         raise self._exception
     if return_exit_code:
         return self._exit_code
     if self._run_command_fn:
         return self._run_command_fn(arg_list)
     if self._exit_code and error_handler:
         script_error = executive.ScriptError(script_args=arg_list,
                                              exit_code=self._exit_code,
                                              output=self._output)
         error_handler(script_error)
     if return_stderr:
         return self._output + self._stderr
     return self._output