Example #1
0
    def run_test(self,
                 tests,
                 expected_stdout,
                 platform='test-win-win7',
                 **kwargs):
        options_defaults = {
            'all': False,
            'csv': False,
            'full': False,
            'platform': platform,
            'include_keyword': [],
            'exclude_keyword': [],
            'paths': False,
        }
        options_defaults.update(kwargs)
        options = optparse.Values(dict(**options_defaults))
        tool = MockWebKitPatch()
        tool.port_factory.all_port_names = lambda: [
            'test-linux-trusty', 'test-linux-precise', 'test-mac-mac10.11',
            'test-mac-mac10.10', 'test-win-win10', 'test-win-win7'
        ]
        command = PrintExpectations()

        oc = OutputCapture()
        try:
            oc.capture_output()
            command.execute(options, tests, tool)
        finally:
            stdout, _, _ = oc.restore_output()
        self.assertMultiLineEqual(stdout, expected_stdout)
Example #2
0
    def run_test(self, tests, expected_stdout, platform='test-win-win7', **kwargs):
        options_defaults = {
            'all': False, 'csv': False, 'full': False, 'platform': platform,
            'include_keyword': [], 'exclude_keyword': [], 'paths': False,
        }
        options_defaults.update(kwargs)
        options = optparse.Values(dict(**options_defaults))
        tool = MockWebKitPatch()
        tool.port_factory.all_port_names = lambda: [
            'test-linux-trusty', 'test-linux-precise',
            'test-mac-mac10.11', 'test-mac-mac10.10',
            'test-win-win10', 'test-win-win7'
        ]
        command = PrintExpectations()

        oc = OutputCapture()
        try:
            oc.capture_output()
            command.execute(options, tests, tool)
        finally:
            stdout, _, _ = oc.restore_output()
        self.assertMultiLineEqual(stdout, expected_stdout)
Example #3
0
 def __init__(self, path):
     super(WebKitPatch, self).__init__()
     self._path = path
     self.commands = [
         AnalyzeBaselines(),
         CopyExistingBaselines(),
         CrashLog(),
         FlakyTests(),
         OptimizeBaselines(),
         PrettyDiff(),
         PrintBaselines(),
         PrintExpectations(),
         Rebaseline(),
         RebaselineCL(),
         RebaselineExpectations(),
         RebaselineTest(),
     ]
     self.help_command = HelpCommand(tool=self)
     self.commands.append(self.help_command)
Example #4
0
 def __init__(self, path):
     MultiCommandTool.__init__(self,
                               commands=[
                                   AnalyzeBaselines(),
                                   AutoRebaseline(),
                                   CommitAnnouncerCommand(),
                                   CopyExistingBaselinesInternal(),
                                   CrashLog(),
                                   FlakyTests(),
                                   LayoutTestsServer(),
                                   OptimizeBaselines(),
                                   PrettyDiff(),
                                   PrintBaselines(),
                                   PrintExpectations(),
                                   Rebaseline(),
                                   RebaselineExpectations(),
                                   RebaselineFromTryJobs(),
                                   RebaselineJson(),
                                   RebaselineServer(),
                                   RebaselineTest(),
                               ])
     Host.__init__(self)
     self._path = path