Changeset 193992 in webkit


Ignore:
Timestamp:
Dec 11, 2015 4:11:40 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

Perf dashboard's buildbot sync config JSON duplicates too much information
https://bugs.webkit.org/show_bug.cgi?id=152196

Reviewed by Stephanie Lewis.

Added shared, per-builder, and per-test (called type) configurations.

  • tools/sync-with-buildbot.py:

(load_config):
(load_config.merge):

Location:
trunk/Websites/perf.webkit.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/perf.webkit.org/ChangeLog

    r192965 r193992  
     12015-12-11  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Perf dashboard's buildbot sync config JSON duplicates too much information
     4        https://bugs.webkit.org/show_bug.cgi?id=152196
     5
     6        Reviewed by Stephanie Lewis.
     7
     8        Added shared, per-builder, and per-test (called type) configurations.
     9
     10        * tools/sync-with-buildbot.py:
     11        (load_config):
     12        (load_config.merge):
     13
    1142015-12-02  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Websites/perf.webkit.org/tools/sync-with-buildbot.py

    r190900 r193992  
    6666def load_config(config_json_path, buildbot_url):
    6767    with open(config_json_path) as config_json:
    68         configurations = json.load(config_json)
    69 
    70     for config in configurations:
     68        options = json.load(config_json)
     69
     70    shared_config = options['shared']
     71    type_config = options['types']
     72    builder_config = options['builders']
     73
     74    def merge(config, config_to_merge):
     75        for key, value in config_to_merge.iteritems():
     76            if isinstance(value, dict):
     77                config.setdefault(key, {})
     78                config[key].update(value)
     79            else:
     80                config[key] = value
     81
     82    configurations = options['configurations']
     83    for config in configurations:
     84
     85        merge(config, shared_config)
     86        merge(config, type_config[config.pop('type')])
     87        merge(config, builder_config[config.pop('builder')])
     88
    7189        escaped_builder_name = urllib.quote(config['builder'])
    7290        config['url'] = '%s/builders/%s/' % (buildbot_url, escaped_builder_name)
Note: See TracChangeset for help on using the changeset viewer.