コード例 #1
0
 def test_missing_unit_test_results_path(self):
     tool = MockTool()
     tool.port().unit_tests_results_path = lambda: None
     reader = LayoutTestResultsReader(tool, "/var/logs")
     reader._create_layout_test_results = lambda: LayoutTestResults([])
     # layout_test_results shouldn't raise even if the unit tests xml file is missing.
     self.assertNotEquals(reader.results(), None)
     self.assertEqual(reader.results().failing_tests(), [])
コード例 #2
0
 def test_missing_unit_test_results_path(self):
     tool = MockTool()
     tool.port().unit_tests_results_path = lambda: None
     reader = LayoutTestResultsReader(tool, "/var/logs")
     reader._create_layout_test_results = lambda: LayoutTestResults([])
     # layout_test_results shouldn't raise even if the unit tests xml file is missing.
     self.assertNotEquals(reader.results(), None)
     self.assertEquals(reader.results().failing_tests(), [])
コード例 #3
0
    def test_runtests_args(self):
        mock_options = self._step_options()
        step = RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = WebKitPort()
        mock_port.name = lambda: "Mac"
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        step = RunTests(tool, mock_options)
        expected_stderr = """Running Python unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy']
Running Perl unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl']
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests']
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--exit-after-n-failures=20', '--quiet']
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
コード例 #4
0
    def test_runtests_args(self):
        mock_options = self._step_options()
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = WebKitPort()
        mock_port.name = lambda: "Mac"
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        step = steps.RunTests(tool, mock_options)
        expected_stderr = """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'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--exit-after-n-failures=30', '--quiet'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
コード例 #5
0
ファイル: steps_unittest.py プロジェクト: Moondee/Artemis
    def test_runtests_args(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = DeprecatedPort()
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        step = steps.RunTests(tool, mock_options)
        expected_stderr = """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'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
コード例 #6
0
    def test_runtests_leopard_commit_queue_hack_command(self):
        mock_options = self._step_options()
        step = RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = WebKitPort()
        mock_port.name = lambda: "Mac"
        mock_port.is_leopard = lambda: True
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        step = RunTests(tool, mock_options)
        expected_stderr = """Running Python unit tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/test-webkitpy']
Running Perl unit tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/test-webkitperl']
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/run-javascriptcore-tests']
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing,media', '--quiet']
"""
        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
コード例 #7
0
ファイル: steps_unittest.py プロジェクト: Tryweirder/h5vcc
    def test_runtests_args(self):
        mock_options = self._step_options()
        mock_options.non_interactive = False
        step = steps.RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = DeprecatedPort()
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        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'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
"""
        OutputCapture().assert_outputs(self,
                                       step.run, [{}],
                                       expected_logs=expected_logs)
コード例 #8
0
    def test_runtests_leopard_commit_queue_hack_command(self):
        mock_options = self._step_options()
        step = RunTests(MockTool(log_executive=True), mock_options)
        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
        mock_port = WebKitPort()
        mock_port.name = lambda: "Mac"
        mock_port.is_leopard = lambda: True
        tool = MockTool(log_executive=True)
        tool.port = lambda: mock_port
        step = RunTests(tool, mock_options)
        expected_stderr = """Running Python unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy']
Running Perl unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl']
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests']
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing,media', '--quiet']
"""
        OutputCapture().assert_outputs(self,
                                       step.run, [{}],
                                       expected_stderr=expected_stderr)