Changeset 84730 in webkit


Ignore:
Timestamp:
Apr 22, 2011 8:17:41 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-04-22 Dirk Pranke <dpranke@chromium.org>

Reviewed by Adam Barth.

rebaseline-chromium-webkit-tests: clean up output
https://bugs.webkit.org/show_bug.cgi?id=59240

This change dramatically changes the output the tool provides
by default. The previous output (more or less) is still there
in -v / verbose / debug mode, but the default output is
way terser and more readable. It mostly says which files are
updated, which are duplicates, and which are not found in an
archive. Feedback desired :).

This change also adds a scm.exists() method to the SCM object
so that we can cleanly figure out what we're doing while
rebaselining.

  • Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py:
  • Scripts/webkitpy/common/system/filesystem_mock.py:
  • Scripts/webkitpy/common/checkout/scm.py:
  • Scripts/webkitpy/common/checkout/scm_unittest.py:
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r84727 r84730  
     12011-04-22  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        rebaseline-chromium-webkit-tests: clean up output
     6        https://bugs.webkit.org/show_bug.cgi?id=59240
     7
     8        This change dramatically changes the output the tool provides
     9        by default. The previous output (more or less) is still there
     10        in -v / verbose / debug mode, but the default output is
     11        way terser and more readable. It mostly says which files are
     12        updated, which are duplicates, and which are not found in an
     13        archive. Feedback desired :).
     14
     15        This change also adds a scm.exists() method to the SCM object
     16        so that we can cleanly figure out what we're doing while
     17        rebaselining.
     18
     19        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
     20        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py:
     21        * Scripts/webkitpy/common/system/filesystem_mock.py:
     22        * Scripts/webkitpy/common/checkout/scm.py:
     23        * Scripts/webkitpy/common/checkout/scm_unittest.py:
     24
    1252011-04-22  Ilya Sherman  <isherman@chromium.org>
    226
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm.py

    r84697 r84730  
    251251        self._subclass_must_implement()
    252252
     253    def exists(self, path):
     254        self._subclass_must_implement()
     255
    253256    def changed_files(self, git_commit=None):
    254257        self._subclass_must_implement()
     
    451454        return self.run(["svn", "delete", "--force", base], cwd=parent)
    452455
     456    def exists(self, path):
     457        return not self.run(["svn", "info", path], return_exit_code=True, decode_output=False)
     458
    453459    def changed_files(self, git_commit=None):
    454460        status_command = ["svn", "status"]
     
    612618# All git-specific logic should go here.
    613619class Git(SCM, SVNRepository):
     620
     621    # Git doesn't appear to document error codes, but seems to return
     622    # 1 or 128, mostly.
     623    ERROR_FILE_IS_MISSING = 128
     624
    614625    def __init__(self, cwd, executive=None):
    615626        SCM.__init__(self, cwd, executive)
     
    712723    def delete(self, path):
    713724        return self.run(["git", "rm", "-f", path])
     725
     726    def exists(self, path):
     727        return_code = self.run(["git", "show", "HEAD:%s" % path], return_exit_code=True, decode_output=False)
     728        return return_code != self.ERROR_FILE_IS_MISSING
    714729
    715730    def merge_base(self, git_commit):
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm_unittest.py

    r84697 r84730  
    177177        # Now that we've deleted the checkout paths, cwddir may be invalid
    178178        # Change back to a valid directory so that later calls to os.getcwd() do not fail.
    179         os.chdir(detect_scm_system(os.path.dirname(__file__)).checkout_root)
     179        if os.path.isabs(__file__):
     180            path = __file__
     181        else:
     182            path = sys.path[0]
     183        os.chdir(detect_scm_system(path).checkout_root)
    180184
    181185
     
    458462        self.scm.add("added_dir/added_file")
    459463        self.assertTrue("added_dir/added_file" in self.scm.added_files())
     464
     465    def _shared_test_exists(self, scm, commit_function):
     466        os.chdir(scm.checkout_root)
     467        self.assertFalse(scm.exists('foo.txt'))
     468        write_into_file_at_path('foo.txt', 'some stuff')
     469        self.assertFalse(scm.exists('foo.txt'))
     470        scm.add('foo.txt')
     471        commit_function('adding foo')
     472        self.assertTrue(scm.exists('foo.txt'))
     473        scm.delete('foo.txt')
     474        commit_function('deleting foo')
     475        self.assertFalse(scm.exists('foo.txt'))
    460476
    461477
     
    831847        run_command(['svn', 'update'])  # Should succeed and not raise.
    832848
     849    def test_exists(self):
     850        self._shared_test_exists(self.scm, self.scm.commit_with_message)
    833851
    834852class GitTest(SCMTest):
     
    878896        patch = scm.create_patch()
    879897        self.assertFalse(re.search(r'Subversion Revision:', patch))
     898
     899    def test_exists(self):
     900        scm = self.untracking_scm
     901        self._shared_test_exists(scm, scm.commit_locally_with_message)
    880902
    881903
     
    13991421        self.assertTrue("-more test content" in cached_diff)
    14001422
     1423    def test_exists(self):
     1424        scm = detect_scm_system(self.git_checkout_path)
     1425        self._shared_test_exists(scm, scm.commit_locally_with_message)
     1426
    14011427
    14021428# We need to split off more of these SCM tests to use mocks instead of the filesystem.
  • trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py

    r84333 r84730  
    126126        return files
    127127
    128     def getcwd(self, path):
     128    def getcwd(self):
    129129        return self.cwd
    130130
  • trunk/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py

    r83824 r84730  
    8181
    8282
    83 def log_dashed_string(text, platform, logging_level=logging.INFO):
     83def log_dashed_string(text, platform=None, logging_level=logging.DEBUG):
    8484    """Log text message with dashes on both sides."""
    85 
    8685    msg = text
    8786    if platform:
     
    9089        dashes = '-' * ((78 - len(msg)) / 2)
    9190        msg = '%s %s %s' % (dashes, msg, dashes)
    92 
    93     if logging_level == logging.ERROR:
    94         _log.error(msg)
    95     elif logging_level == logging.WARNING:
    96         _log.warn(msg)
    97     else:
    98         _log.info(msg)
     91    _log.log(logging_level, msg)
    9992
    10093
     
    112105
    113106    html_directory = filesystem.join(parent_directory, 'rebaseline_html')
    114     _log.info('Html directory: "%s"', html_directory)
     107    _log.debug('Html directory: "%s"', html_directory)
    115108
    116109    if filesystem.exists(html_directory):
    117110        filesystem.rmtree(html_directory)
    118         _log.info('Deleted html directory: "%s"', html_directory)
     111        _log.debug('Deleted html directory: "%s"', html_directory)
    119112
    120113    filesystem.maybe_make_directory(html_directory)
     
    149142    REVISION_REGEX = r'<a href=\"(\d+)/\">'
    150143
    151     def __init__(self, running_port, target_port, platform, options, url_fetcher, zip_factory, scm):
     144    def __init__(self, running_port, target_port, platform, options, url_fetcher, zip_factory, scm, logged_before=False):
    152145        """
    153146        Args:
     
    161154            zip_factory: optional object that can fetch zip files from URLs
    162155            scm: scm object for adding new baselines
     156            logged_before: whether the previous running port logged anything.
    163157        """
    164158        self._platform = platform
     
    171165        self._rebaselining_tests = set()
    172166        self._rebaselined_tests = []
     167        self._logged_before = logged_before
     168        self.did_log = False
    173169
    174170        # Create tests and expectations helper which is used to:
     
    186182        """Run rebaseline process."""
    187183
    188         log_dashed_string('Compiling rebaselining tests', self._platform)
     184        log_dashed_string('Compiling rebaselining tests', self._platform, logging.DEBUG)
    189185        if not self._compile_rebaselining_tests():
    190186            return False
     
    192188            return True
    193189
    194         log_dashed_string('Downloading archive', self._platform)
     190        self.did_log = True
     191        log_dashed_string('Downloading archive', self._platform, logging.DEBUG)
    195192        archive_file = self._download_buildbot_archive()
    196         _log.info('')
     193        _log.debug('')
    197194        if not archive_file:
    198195            _log.error('No archive found.')
    199196            return False
    200197
    201         log_dashed_string('Extracting and adding new baselines', self._platform)
    202         if not self._extract_and_add_new_baselines(archive_file):
    203             archive_file.close()
     198        log_dashed_string('Extracting and adding new baselines', self._platform, logging.DEBUG)
     199        self._extract_and_add_new_baselines(archive_file)
     200        archive_file.close()
     201
     202        log_dashed_string('Updating rebaselined tests in file', self._platform)
     203
     204        if len(self._rebaselining_tests) != len(self._rebaselined_tests):
     205            _log.debug('')
     206            _log.debug('NOT ALL TESTS WERE REBASELINED.')
     207            _log.debug('  Number marked for rebaselining: %d', len(self._rebaselining_tests))
     208            _log.debug('  Number actually rebaselined: %d', len(self._rebaselined_tests))
     209            _log.info('')
    204210            return False
    205211
    206         archive_file.close()
    207 
    208         log_dashed_string('Updating rebaselined tests in file', self._platform)
    209 
    210         if len(self._rebaselining_tests) != len(self._rebaselined_tests):
    211             _log.warning('NOT ALL TESTS THAT NEED REBASELINING HAVE BEEN REBASELINED.')
    212             _log.warning('  Total tests needing rebaselining: %d', len(self._rebaselining_tests))
    213             _log.warning('  Total tests rebaselined: %d', len(self._rebaselined_tests))
    214             return False
    215 
    216         _log.warning('All tests needing rebaselining were successfully rebaselined.')
    217 
     212        _log.debug('  All tests needing rebaselining were successfully rebaselined.')
     213        _log.info('')
    218214        return True
    219215
     
    227223            if self._filesystem.exists(backup_file):
    228224                self._filesystem.remove(backup_file)
    229             _log.info('Saving original file to "%s"', backup_file)
     225            _log.debug('Saving original file to "%s"', backup_file)
    230226            self._filesystem.move(path, backup_file)
    231227
     
    245241        self._rebaselining_tests = self._test_expectations.get_rebaselining_failures()
    246242        if not self._rebaselining_tests:
    247             _log.warn('No tests found that need rebaselining.')
     243            _log.info('%s: No tests to rebaseline.', self._platform)
    248244            return True
    249245
     
    257253                return False
    258254
    259         _log.info('Total number of tests needing rebaselining for "%s": "%d"',
    260                   self._platform, len(self._rebaselining_tests))
    261 
     255        if not self._logged_before:
     256            _log.info('')
     257        _log.info('%s: Rebaselining %d tests:', self._platform, len(self._rebaselining_tests))
    262258        test_no = 1
    263259        for test in self._rebaselining_tests:
    264             _log.info('  %d: %s', test_no, test)
     260            _log.debug('  %d: %s', test_no, test)
    265261            test_no += 1
    266262
     
    288284
    289285        revisions.sort(key=int)
    290         _log.info('Latest revision: "%s"', revisions[len(revisions) - 1])
     286        _log.debug('  Latest revision: %s', revisions[len(revisions) - 1])
    291287        return revisions[len(revisions) - 1]
    292288
     
    328324            return None
    329325        archive_url = '%s%s/layout-test-results.zip' % (url_base, latest_revision)
    330         _log.info('Archive url: "%s"', archive_url)
     326        _log.info('  Using %s', archive_url)
    331327        return archive_url
    332328
     
    339335        archive_file = zipfileset.ZipFileSet(url, filesystem=self._filesystem,
    340336                                             zip_factory=self._zip_factory)
    341         _log.info('Archive downloaded')
     337        _log.debug('Archive downloaded')
    342338        return archive_file
    343339
     
    357353        self._rebaselined_tests = []
    358354        for test_no, test in enumerate(self._rebaselining_tests):
    359             _log.info('Test %d: %s', test_no + 1, test)
     355            _log.debug('Test %d: %s', test_no + 1, test)
    360356            self._extract_and_add_new_baseline(test, zip_file)
    361 
    362         zip_file.close()
    363 
    364         return self._rebaselined_tests
    365357
    366358    def _extract_and_add_new_baseline(self, test, zip_file):
     
    372364            _log.debug('  Archive test file name: "%s"', archive_test_name)
    373365            if not archive_test_name in zip_file.namelist():
    374                 _log.info('  %s file not in archive.', suffix)
     366                _log.debug('  %s file not in archive.', suffix)
    375367                continue
    376368
    377369            found = True
    378             _log.info('  %s file found in archive.', suffix)
     370            _log.debug('  %s file found in archive.', suffix)
    379371
    380372            temp_name = self._extract_from_zip_to_tempfile(zip_file, archive_test_name)
     
    385377            expected_fullpath = self._filesystem.normpath(expected_fullpath)
    386378            _log.debug('  Expected file full path: "%s"', expected_fullpath)
     379
     380            relpath = self._filesystem.relpath(expected_fullpath, self._target_port.layout_tests_dir())
    387381
    388382            # TODO(victorw): for now, the rebaselining tool checks whether
     
    392386            if self._is_dup_baseline(temp_name, expected_fullpath, test, suffix, self._platform):
    393387                self._filesystem.remove(temp_name)
    394                 self._delete_baseline(expected_fullpath)
     388                if self._filesystem.exists(expected_fullpath):
     389                    _log.info('  Removing %s' % relpath)
     390                    self._delete_baseline(expected_fullpath)
     391                _log.debug('  %s is a duplicate' % relpath)
     392
     393                # FIXME: We consider a duplicate baseline a success in the normal case.
     394                # FIXME: This may not be what you want sometimes; should this be
     395                # FIXME: controllable?
     396                self._rebaselined_tests.append(test)
    395397                continue
    396398
     
    404406            self._filesystem.move(temp_name, expected_fullpath)
    405407
     408            # FIXME: SCM module doesn't handle paths that aren't relative to the checkout_root consistently.
     409            self._filesystem.chdir(self._scm.checkout_root)
     410            path_from_base = self._filesystem.relpath(expected_fullpath, self._filesystem.getcwd())
     411            if self._scm.exists(path_from_base):
     412                _log.info('  Updating %s' % relpath)
     413            else:
     414                _log.info('  Adding %s' % relpath)
     415
    406416            if self._scm.add(expected_fullpath, return_exit_code=True):
    407417                # FIXME: print detailed diagnose messages
     
    411421
    412422        if not found:
    413             _log.warn('  No new baselines found in archive.')
     423            _log.warn('No results in archive for %s' % test)
    414424        elif scm_error:
    415             _log.warn('  Failed to add baselines to your repository.')
     425            _log.warn('Failed to add baselines to your repository.')
    416426        else:
    417             _log.info('  Rebaseline succeeded.')
     427            _log.debug('  Rebaseline succeeded.')
    418428            self._rebaselined_tests.append(test)
    419429
     
    474484        all_baselines = self._rebaseline_port.expected_baselines(
    475485            test_filepath, suffix, True)
     486        test_relpath = self._filesystem.relpath(test_filepath, self._target_port.layout_tests_dir())
    476487
    477488        for fallback_dir, fallback_file in all_baselines:
     
    483494            if fallback_fullpath.lower() == baseline_path.lower():
    484495                continue
     496            fallback_dir_relpath = self._filesystem.relpath(fallback_dir, self._target_port.layout_tests_dir())
     497            if fallback_dir_relpath == '':
     498                fallback_dir_relpath = '<generic>'
    485499
    486500            new_output = self._filesystem.read_binary_file(new_baseline)
     
    488502            is_image = baseline_path.lower().endswith('.png')
    489503            if not self._diff_baselines(new_output, fallback_output, is_image):
    490                 _log.info('  Found same baseline at %s', fallback_fullpath)
     504                _log.info('  Skipping %s (matches %s)', test_relpath, fallback_dir_relpath)
    491505                return True
    492506            return False
     
    530544        """
    531545
    532         if not baseline_fullpath or not self._filesystem.exists(baseline_fullpath):
     546        if (not baseline_fullpath
     547            or not self._filesystem.exists(baseline_fullpath)):
     548            return
     549
     550        if not self._scm.exists(baseline_fullpath):
    533551            return
    534552
     
    538556                                            baseline_filename, self._platform, 'new')
    539557        self._filesystem.copyfile(baseline_fullpath, new_file)
    540         _log.info('  Html: copied new baseline file from "%s" to "%s".',
     558        _log.debug('  Html: copied new baseline file from "%s" to "%s".',
    541559                  baseline_fullpath, new_file)
    542560
     
    545563            output = self._scm.show_head(baseline_fullpath)
    546564        except ScriptError, e:
    547             _log.info(e)
     565            _log.warning(e)
    548566            output = ""
    549567
    550568        if (not output) or (output.upper().rstrip().endswith('NO SUCH FILE OR DIRECTORY')):
    551             _log.info('  No base file: "%s"', baseline_fullpath)
     569            _log.warning('  No base file: "%s"', baseline_fullpath)
    552570            return
    553571        base_file = get_result_file_fullpath(self._filesystem, self._options.html_directory,
     
    557575        else:
    558576            self._filesystem.write_text_file(base_file, output)
    559         _log.info('  Html: created old baseline file: "%s".', base_file)
     577        _log.debug('  Html: created old baseline file: "%s".', base_file)
    560578
    561579        # Get the diff between old and new baselines and save to the html dir.
     
    567585                    self._platform, 'diff')
    568586                self._filesystem.write_text_file(diff_file, output)
    569                 _log.info('  Html: created baseline diff file: "%s".', diff_file)
     587                _log.debug('  Html: created baseline diff file: "%s".', diff_file)
    570588
    571589
     
    634652        """Generate html file for rebaselining result comparison."""
    635653
    636         _log.info('Generating html file')
     654        _log.debug('Generating html file')
    637655
    638656        html_body = ''
     
    645663            test_no = 1
    646664            for test in tests:
    647                 _log.info('Test %d: %s', test_no, test)
     665                _log.debug('Test %d: %s', test_no, test)
    648666                html_body += self._generate_html_for_one_test(test)
    649667
     
    653671
    654672        self._filesystem.write_text_file(self._html_file, html)
    655         _log.info('Baseline comparison html generated at "%s"', self._html_file)
     673        _log.debug('Baseline comparison html generated at "%s"', self._html_file)
    656674
    657675    def show_html(self):
    658676        """Launch the rebaselining html in brwoser."""
    659677
    660         _log.info('Launching html: "%s"', self._html_file)
     678        _log.debug('Launching html: "%s"', self._html_file)
    661679        self._port._user.open_url(self._html_file)
    662         _log.info('Html launched.')
     680        _log.debug('Html launched.')
    663681
    664682    def _generate_baseline_links(self, test_basename, suffix, platform):
     
    679697        new_file = get_result_file_fullpath(self._filesystem, self._html_directory,
    680698                                            baseline_filename, platform, 'new')
    681         _log.info('    New baseline file: "%s"', new_file)
     699        _log.debug('    New baseline file: "%s"', new_file)
    682700        if not self._filesystem.exists(new_file):
    683             _log.info('    No new baseline file: "%s"', new_file)
     701            _log.debug('    No new baseline file: "%s"', new_file)
    684702            return ''
    685703
    686704        old_file = get_result_file_fullpath(self._filesystem, self._html_directory,
    687705                                            baseline_filename, platform, 'old')
    688         _log.info('    Old baseline file: "%s"', old_file)
     706        _log.debug('    Old baseline file: "%s"', old_file)
    689707        if suffix == '.png':
    690708            html_td_link = self.HTML_TD_LINK_IMG
     
    698716                'name': baseline_filename}
    699717        else:
    700             _log.info('    No old baseline file: "%s"', old_file)
     718            _log.debug('    No old baseline file: "%s"', old_file)
    701719            links += self.HTML_TD_NOLINK % ''
    702720
     
    706724        diff_file = get_result_file_fullpath(self._filesystem, self._html_directory,
    707725                                             baseline_filename, platform, 'diff')
    708         _log.info('    Baseline diff file: "%s"', diff_file)
     726        _log.debug('    Baseline diff file: "%s"', diff_file)
    709727        if self._filesystem.exists(diff_file):
    710728            links += html_td_link % {'uri': self.abspath_to_uri(diff_file),
    711729                                     'name': 'Diff'}
    712730        else:
    713             _log.info('    No baseline diff file: "%s"', diff_file)
     731            _log.debug('    No baseline diff file: "%s"', diff_file)
    714732            links += self.HTML_TD_NOLINK % ''
    715733
     
    727745
    728746        test_basename = self._filesystem.basename(self._filesystem.splitext(test)[0])
    729         _log.info('  basename: "%s"', test_basename)
     747        _log.debug('  basename: "%s"', test_basename)
    730748        rows = []
    731749        for suffix in BASELINE_SUFFIXES:
     
    733751                continue
    734752
    735             _log.info('  Checking %s files', suffix)
     753            _log.debug('  Checking %s files', suffix)
    736754            for platform in self._platforms:
    737755                links = self._generate_baseline_links(test_basename, suffix, platform)
     
    854872
    855873
     874class DebugLogHandler(logging.Handler):
     875    num_failures = 0
     876
     877    def __init__(self):
     878        logging.Handler.__init__(self)
     879        self.formatter = logging.Formatter(fmt=('%(asctime)s %(filename)s:%(lineno)-3d '
     880                                                '%(levelname)s %(message)s'))
     881        self.setFormatter(self.formatter)
     882
     883    def emit(self, record):
     884        if record.levelno > logging.INFO:
     885            self.num_failures += 1
     886        print self.format(record)
     887
     888
     889class NormalLogHandler(logging.Handler):
     890    last_levelno = None
     891    num_failures = 0
     892
     893    def emit(self, record):
     894        if record.levelno > logging.INFO:
     895            self.num_failures += 1
     896        if self.last_levelno != record.levelno:
     897            print
     898            self.last_levelno = record.levelno
     899        prefix = ''
     900        msg = record.getMessage()
     901        if record.levelno > logging.INFO and msg:
     902            prefix = '%s: ' % record.levelname
     903        print '%s%s' % (prefix, msg)
     904
     905
    856906def main(args):
    857907    """Bootstrap function that sets up the object references we need and calls real_main()."""
    858908    options, target_options = parse_options(args)
    859909
    860     # Set up our logging format.
    861     log_level = logging.INFO
     910    logger = logging.getLogger()
     911    logger.setLevel(logging.INFO)
    862912    if options.verbose:
    863913        log_level = logging.DEBUG
    864     logging.basicConfig(level=log_level,
    865                         format=('%(asctime)s %(filename)s:%(lineno)-3d '
    866                                 '%(levelname)s %(message)s'),
    867                         datefmt='%y%m%d %H:%M:%S')
     914        log_handler = DebugLogHandler()
     915    else:
     916        log_level = logging.INFO
     917        log_handler = NormalLogHandler()
     918
     919    logger = logging.getLogger()
     920    logger.setLevel(log_level)
     921    logger.addHandler(log_handler)
    868922
    869923    target_port_obj = port.get(None, target_options)
     
    878932    zip_factory = None
    879933
    880     return real_main(options, target_options, host_port_obj, target_port_obj, url_fetcher,
    881                      zip_factory, scm_obj)
     934    ret_code = real_main(options, target_options, host_port_obj, target_port_obj, url_fetcher,
     935                         zip_factory, scm_obj)
     936    if not ret_code and log_handler.num_failures:
     937        ret_code = 1
     938    print ''
     939    if ret_code:
     940        print 'Rebaselining failed.'
     941    else:
     942        print 'Rebaselining succeeded.'
     943    return ret_code
    882944
    883945
     
    918980        rebaseline_platforms = all_platforms
    919981
     982    # FIXME: These log messages will be wrong if ports store baselines outside
     983    # of layout_tests_dir(), but the code should work correctly.
     984    layout_tests_dir = target_port_obj.layout_tests_dir()
     985    expectations_path = target_port_obj.path_to_test_expectations_file()
     986    _log.info('Using %s' % layout_tests_dir)
     987    _log.info('  and %s' % expectations_path)
     988
    920989    rebaselined_tests = set()
     990    logged_before = False
    921991    for platform in rebaseline_platforms:
    922992        rebaseliner = Rebaseliner(host_port_obj, target_port_obj,
    923993                                  platform, options, url_fetcher, zip_factory,
    924                                   scm_obj)
    925 
    926         _log.info('')
     994                                  scm_obj, logged_before)
     995
     996        _log.debug('')
    927997        log_dashed_string('Rebaseline started', platform)
    928998        if rebaseliner.run():
    929999            log_dashed_string('Rebaseline done', platform)
    9301000        else:
    931             log_dashed_string('Rebaseline failed', platform, logging.ERROR)
     1001            log_dashed_string('Rebaseline failed', platform)
    9321002
    9331003        rebaselined_tests |= set(rebaseliner.get_rebaselined_tests())
     1004        logged_before = rebaseliner.did_log
    9341005
    9351006    if rebaselined_tests:
     
    9371008                                                     options.backup)
    9381009
    939     _log.info('')
    940     log_dashed_string('Rebaselining result comparison started', None)
     1010    _log.debug('')
     1011    log_dashed_string('Rebaselining result comparison started')
    9411012    html_generator = HtmlGenerator(host_port_obj,
    9421013                                   target_port_obj,
     
    9471018    if not options.quiet:
    9481019        html_generator.show_html()
    949     log_dashed_string('Rebaselining result comparison done', None)
     1020    log_dashed_string('Rebaselining result comparison done')
    9501021
    9511022    return 0
  • trunk/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py

    r82892 r84730  
    203203        zip_factory = test_zip_factory()
    204204        mock_scm = mocktool.MockSCM(filesystem)
     205        filesystem.maybe_make_directory(mock_scm.checkout_root)
    205206        rebaseliner = rebaseline_chromium_webkit_tests.Rebaseliner(host_port_obj,
    206207            target_port_obj, platform, options, url_fetcher, zip_factory, mock_scm)
     
    337338        zip_factory = test_zip_factory()
    338339        mock_scm = mocktool.MockSCM()
     340        filesystem.maybe_make_directory(mock_scm.checkout_root)
    339341        oc = outputcapture.OutputCapture()
    340342        oc.capture_output()
Note: See TracChangeset for help on using the changeset viewer.