Changeset 204168 in webkit


Ignore:
Timestamp:
Aug 5, 2016 8:39:10 AM (8 years ago)
Author:
Konstantin Tokarev
Message:

Print test name in "Last character read from DRT..." error message.
https://bugs.webkit.org/show_bug.cgi?id=160559

Reviewed by Michael Catanzaro.

  • Scripts/webkitpy/port/driver.py:

(Driver.run_test):
(Driver._read_first_block):
(Driver._read_optional_image_block):
(Driver._read_block):

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_read_block):
(DriverTest.test_read_binary_block):
(DriverTest.test_read_base64_block):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r204167 r204168  
     12016-08-05  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        Print test name in "Last character read from DRT..." error message.
     4        https://bugs.webkit.org/show_bug.cgi?id=160559
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * Scripts/webkitpy/port/driver.py:
     9        (Driver.run_test):
     10        (Driver._read_first_block):
     11        (Driver._read_optional_image_block):
     12        (Driver._read_block):
     13        * Scripts/webkitpy/port/driver_unittest.py:
     14        (DriverTest.test_read_block):
     15        (DriverTest.test_read_binary_block):
     16        (DriverTest.test_read_base64_block):
     17
    1182016-08-05  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Tools/Scripts/webkitpy/port/driver.py

    r204167 r204168  
    198198
    199199        self._server_process.write(command)
    200         text, audio = self._read_first_block(deadline)  # First block is either text or audio
    201         image, actual_image_hash = self._read_optional_image_block(deadline)  # The second (optional) block is image data.
     200        text, audio = self._read_first_block(deadline, driver_input.test_name)  # First block is either text or audio
     201        image, actual_image_hash = self._read_optional_image_block(deadline, driver_input.test_name)  # The second (optional) block is image data.
    202202
    203203        crashed = self.has_crashed()
     
    470470        return command + "\n"
    471471
    472     def _read_first_block(self, deadline):
     472    def _read_first_block(self, deadline, test_name):
    473473        # returns (text_content, audio_content)
    474         block = self._read_block(deadline)
     474        block = self._read_block(deadline, test_name)
    475475        if block.malloc:
    476476            self._measurements['Malloc'] = float(block.malloc)
     
    481481        return (block.decoded_content, None)
    482482
    483     def _read_optional_image_block(self, deadline):
     483    def _read_optional_image_block(self, deadline, test_name):
    484484        # returns (image, actual_image_hash)
    485         block = self._read_block(deadline, wait_for_stderr_eof=True)
     485        block = self._read_block(deadline, test_name, wait_for_stderr_eof=True)
    486486        if block.content and block.content_type == 'image/png':
    487487            return (block.decoded_content, block.content_hash)
     
    514514        return line, False
    515515
    516     def _read_block(self, deadline, wait_for_stderr_eof=False):
     516    def _read_block(self, deadline, test_name, wait_for_stderr_eof=False):
    517517        block = ContentBlock()
    518518        out_seen_eof = False
     
    545545                self._check_for_driver_timeout(out_line)
    546546                if out_line[-1] != "\n":
    547                     _log.error("Last character read from DRT stdout line was not a newline!  This indicates either a NRWT or DRT bug.")
     547                    _log.error("  %s -> Last character read from DRT stdout line was not a newline!  This indicates either a NRWT or DRT bug." % test_name)
    548548                content_length_before_header_check = block._content_length
    549549                self._process_stdout_line(block, out_line)
  • trunk/Tools/Scripts/webkitpy/port/driver_unittest.py

    r202362 r204168  
    136136            "#EOF",
    137137        ])
    138         content_block = driver._read_block(0)
     138        content_block = driver._read_block(0, "")
    139139        self.assertEqual(content_block.content_type, 'my_type')
    140140        self.assertEqual(content_block.encoding, 'none')
     
    153153            "#EOF",
    154154        ])
    155         content_block = driver._read_block(0)
     155        content_block = driver._read_block(0, "")
    156156        self.assertEqual(content_block.content_type, 'image/png')
    157157        self.assertEqual(content_block.content_hash, 'actual')
     
    171171            'MTIzNDU2NzgK#EOF',
    172172        ])
    173         content_block = driver._read_block(0)
     173        content_block = driver._read_block(0, "")
    174174        self.assertEqual(content_block.content_type, 'image/png')
    175175        self.assertEqual(content_block.content_hash, 'actual')
Note: See TracChangeset for help on using the changeset viewer.