コード例 #1
0
 def handle_global_options(self, options):
     self.initialize_scm(options.patch_directories)
     if options.status_host:
         self.status_server.set_host(options.status_host)
     if options.bot_id:
         self.status_server.set_bot_id(options.bot_id)
     # If options.port is None, we'll get the default port for this platform.
     self._deprecated_port = DeprecatedPort.port(options.port)
コード例 #2
0
 def handle_global_options(self, options):
     self.initialize_scm(options.patch_directories)
     if options.status_host:
         self.status_server.set_host(options.status_host)
     if options.bot_id:
         self.status_server.set_bot_id(options.bot_id)
     # If options.port is None, we'll get the default port for this platform.
     self._deprecated_port = DeprecatedPort.port(options.port)
コード例 #3
0
 def begin_work_queue(self):
     AbstractPatchQueue.begin_work_queue(self)
     if not self.port_name:
         return
     # FIXME: This is only used for self._deprecated_port.flag()
     self._deprecated_port = DeprecatedPort.port(self.port_name)
     # FIXME: This violates abstraction
     self._tool._deprecated_port = self._deprecated_port
     self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
コード例 #4
0
 def begin_work_queue(self):
     AbstractPatchQueue.begin_work_queue(self)
     if not self.port_name:
         return
     # FIXME: This is only used for self._deprecated_port.flag()
     self._deprecated_port = DeprecatedPort.port(self.port_name)
     # FIXME: This violates abstraction
     self._tool._deprecated_port = self._deprecated_port
     self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name))
コード例 #5
0
 def __init__(self):
     options = [
         make_option("--run-tests",
                     action="store_true",
                     dest="run_tests",
                     default=self._default_run_tests,
                     help="Run the Layout tests for each patch")
     ]
     AbstractReviewQueue.__init__(self, options=options)
     self.port = DeprecatedPort.port(self.port_name)
コード例 #6
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
 def test_patch_not_relevant_bindings(self):
     self.maxDiff = None
     mock_options = self._step_options()
     mock_options.group = "bindings"
     tool = MockTool(log_executive=True)
     tool.scm()._mockChangedFiles = ["Source/JavaScriptCore/Makefile", "Source/ChangeLog"]
     # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
     tool._deprecated_port = DeprecatedPort()
     step = steps.CheckPatchRelevance(tool, mock_options)
     expected_logs = """Checking relevance of patch
コード例 #7
0
    def begin_work_queue(self):
        AbstractPatchQueue.begin_work_queue(self)
        if not self.port_name:
            return
        # FIXME: This is only used for self._deprecated_port.flag()
        self._deprecated_port = DeprecatedPort.port(self.port_name)
        # FIXME: This violates abstraction
        self._tool._deprecated_port = self._deprecated_port

        self._create_port()
コード例 #8
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_patch_relevant(self):
        self.maxDiff = None
        mock_options = self._step_options()
        tool = MockTool(log_executive=True)
        tool.scm()._mockChangedFiles = ["JSTests/MockFile1", "ChangeLog"]
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.CheckPatchRelevance(tool, mock_options)
        expected_logs = """Checking relevance of patch
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #9
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_runtests_jsc_debug(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "debug"
        mock_options.group = "jsc"
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        expected_logs = """MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests', '--no-fail-fast', '--debug', '--json-output=/tmp/jsc_test_results.json'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #10
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_runtests_webkitpy(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.group = "webkitpy"
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        expected_logs = """MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy', '--json-output=/tmp/python-unittest-results/webkitpy_test_results.json'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #11
0
 def __init__(self):
     options = [
         make_option(
             "--run-tests",
             action="store_true",
             dest="run_tests",
             default=self._default_run_tests,
             help="Run the Layout tests for each patch",
         )
     ]
     AbstractReviewQueue.__init__(self, options=options)
     self.port = DeprecatedPort.port(self.port_name)
コード例 #12
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_runtests_api_debug(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "debug"
        mock_options.group = "api"
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        tool = MockTool(log_executive=True)
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        expected_logs = """MOCK run_and_throw_if_fail: ['Tools/Scripts/run-api-tests', '--debug', '--json-output=/tmp/api_test_results.json'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #13
0
ファイル: steps_unittest.py プロジェクト: eocanha/webkit
 def test_patch_relevant(self):
     self.maxDiff = None
     mock_options = self._step_options()
     tool = MockTool(log_executive=True)
     tool.scm()._mockChangedFiles = ["JSTests/MockFile1", "ChangeLog"]
     # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
     tool._deprecated_port = DeprecatedPort()
     step = steps.CheckPatchRelevance(tool, mock_options)
     with OutputCapture(level=logging.INFO) as captured:
         step.run({})
     self.assertEqual(
         captured.root.log.getvalue(),
         'Checking relevance of patch\n',
     )
コード例 #14
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_patch_not_relevant_jsc(self):
        self.maxDiff = None
        mock_options = self._step_options()
        mock_options.group = "jsc"
        tool = MockTool(log_executive=True)
        tool.scm()._mockChangedFiles = ["Tools/ChangeLog", "Tools/Scripts/webkitpy/tool/steps/steps_unittest.py"]
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.CheckPatchRelevance(tool, mock_options)
        expected_logs = """Checking relevance of patch
This patch does not have relevant changes.
"""
        with self.assertRaises(ScriptError):
            OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #15
0
 def test_runtests_jsc_debug(self):
     mock_options = self._step_options()
     mock_options.non_interactive = False
     mock_options.build_style = "debug"
     mock_options.group = "jsc"
     tool = MockTool(log_executive=True)
     # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
     tool._deprecated_port = DeprecatedPort()
     step = steps.RunTests(tool, mock_options)
     with OutputCapture(level=logging.INFO) as captured:
         step.run({})
     self.assertEqual(
         captured.root.log.getvalue(),
         "MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests', '--no-fail-fast', '--debug', '--json-output=/tmp/jsc_test_results.json'], cwd=/mock-checkout\n",
     )
コード例 #16
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_build_jsc(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "release"
        mock_options.build = True
        mock_options.architecture = True
        mock_options.group = "jsc"
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.Build(tool, mock_options)
        expected_logs = """Building WebKit
MOCK run_and_throw_if_fail: ['Tools/Scripts/build-jsc', '--release', 'ARCHS=True'], cwd=/mock-checkout, env={'MOCK_ENVIRON_COPY': '1', 'TERM': 'dumb'}
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #17
0
    def test_runtests_jsc(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "release"
        mock_options.group = "jsc"
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        expected_logs = """MOCK run_command: ['perl', 'Tools/Scripts/webkit-build-directory', '--configuration', '--release', '--mac'], cwd=/mock-checkout
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests', '--no-fail-fast', '--release', '--json-output=/MOCK output of child process/jsc_test_results.json'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self,
                                       step.run, [{}],
                                       expected_logs=expected_logs)
コード例 #18
0
ファイル: main.py プロジェクト: JohnColanduoni/webkit
    def handle_global_options(self, options):
        self.initialize_scm(options.patch_directories)

        api_key = self._status_server_api_key()
        if api_key:
            self.status_server.set_api_key(api_key)

        if options.status_host:
            self.status_server.set_host(options.status_host)
        self.status_server.set_use_https(options.status_host_uses_https)
        if options.bot_id:
            self.status_server.set_bot_id(options.bot_id)
        if options.irc_password:
            self.irc_password = options.irc_password
        # If options.port is None, we'll get the default port for this platform.
        self._deprecated_port = DeprecatedPort.port(options.port)
コード例 #19
0
ファイル: steps_unittest.py プロジェクト: eocanha/webkit
    def test_build_jsc(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "release"
        mock_options.build = True
        mock_options.architecture = True
        mock_options.group = "jsc"
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.Build(tool, mock_options)
        with OutputCapture(level=logging.INFO) as captured:
            step.run({})
        self.assertEqual(
            captured.root.log.getvalue(),
            '''Building WebKit
MOCK run_and_throw_if_fail: ['Tools/Scripts/build-jsc', '--release', 'ARCHS=True'], cwd=/mock-checkout, env={'MOCK_ENVIRON_COPY': '1', 'TERM': 'dumb'}
''',
        )
コード例 #20
0
ファイル: steps_unittest.py プロジェクト: wuyibo0817/webkit
    def test_runtests_debug_args(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "debug"
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        expected_logs = """Running Python unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy'], cwd=/mock-checkout
Running Perl unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl'], cwd=/mock-checkout
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests', '--no-fail-fast'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--debug', '--quiet'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
コード例 #21
0
ファイル: steps_unittest.py プロジェクト: eocanha/webkit
    def test_patch_not_relevant_jsc(self):
        self.maxDiff = None
        mock_options = self._step_options()
        mock_options.group = "jsc"
        tool = MockTool(log_executive=True)
        tool.scm()._mockChangedFiles = [
            "Tools/ChangeLog",
            "Tools/Scripts/webkitpy/tool/steps/steps_unittest.py"
        ]
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.CheckPatchRelevance(tool, mock_options)

        with self.assertRaises(ScriptError), OutputCapture(
                level=logging.INFO) as captured:
            step.run({})
        self.assertEqual(
            captured.root.log.getvalue(),
            'Checking relevance of patch\n',
        )
コード例 #22
0
    def test_runtests_debug_args(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        mock_options.build_style = "debug"
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        tool = MockTool(log_executive=True)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        tool._deprecated_port = DeprecatedPort()
        step = steps.RunTests(tool, mock_options)
        with OutputCapture(level=logging.INFO) as captured:
            step.run({})
        self.assertEqual(
            captured.root.log.getvalue(),
            '''Running Python unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy'], cwd=/mock-checkout
Running Perl unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl'], cwd=/mock-checkout
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests', '--no-fail-fast'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--debug', '--quiet'], cwd=/mock-checkout
''',
        )
コード例 #23
0
 def __init__(self):
     AbstractPatchQueue.__init__(self)
     self.port = DeprecatedPort.port(self.port_name)
コード例 #24
0
 def __init__(self):
     AbstractPatchQueue.__init__(self)
     self.port = DeprecatedPort.port(self.port_name)
コード例 #25
0
 def handle_global_options(self, options):
     self.initialize_scm(options.patch_directories)
     # If options.port is None, we'll get the default port for this platform.
     self._deprecated_port = DeprecatedPort.port(options.port)
コード例 #26
0
 def handle_global_options(self, options):
     self.initialize_scm(options.patch_directories)
     # If options.port is None, we'll get the default port for this platform.
     self._deprecated_port = DeprecatedPort.port(options.port)