| Index: appengine/findit/model/crash/crash_config.py
|
| diff --git a/appengine/findit/model/crash/crash_config.py b/appengine/findit/model/crash/crash_config.py
|
| index 20e6c7a3558caa0a51d6cc4b5ecb29c9276b9ca7..6151b9800d49c2a866cfca5f08a688173a56c006 100644
|
| --- a/appengine/findit/model/crash/crash_config.py
|
| +++ b/appengine/findit/model/crash/crash_config.py
|
| @@ -4,6 +4,9 @@
|
|
|
| """Findit for crash (ClusterFuzz & Fracas/Chromecrash) configuration."""
|
|
|
| +import copy
|
| +import re
|
| +
|
| from google.appengine.ext import ndb
|
|
|
| from model.versioned_config import VersionedConfig
|
| @@ -19,3 +22,73 @@ class CrashConfig(VersionedConfig):
|
| # },
|
| # }
|
| fracas = ndb.JsonProperty(indexed=False, default={})
|
| +
|
| + ################## Settings shared by Fracas/Clusterfuzz. ##################
|
| + # Project classifier settings:
|
| + # {
|
| + # 'host_directories': [
|
| + # 'src/chrome/browser/resources/',
|
| + # 'src/chrome/test/data/layout_tests/',
|
| + # 'src/media/',
|
| + # 'src/sdch/',
|
| + # 'src/testing/',
|
| + # 'src/third_party/WebKit/',
|
| + # 'src/third_party/',
|
| + # 'src/tools/',
|
| + # 'src/'
|
| + # ],
|
| + # # Where there is no dep_path found, use function and file_path makers to
|
| + # # map a Result or StackFrame to a project name.
|
| + # "function_marker_to_project_name": {
|
| + # "org.chromium": 'chromium',
|
| + # "com.google.android.apps.chrome": "clank",
|
| + # "android.": "android_os",
|
| + # "com.android.": "android_os",
|
| + # },
|
| + # "file_path_marker_to_project_name": {
|
| + # ("https___googleplex-android.googlesource."
|
| + # "com_a_platform_manifest.git/"): "android_os",
|
| + # "googleplex-android/": "android_os",
|
| + # },
|
| + #
|
| + # # Number of frames on top to consider when deciding the crashed project.
|
| + # "top_n": 4,
|
| + #
|
| + # # The chromium project should always have the highest rank priority (0).
|
| + # # This dict assigns rank priorities to non chromium projects.
|
| + # "non_chromium_project_rank_priority" = {
|
| + # 'clank': -1,
|
| + # 'android_os': -2,
|
| + # 'android_os_java': -2,
|
| + # 'src_internal': -3,
|
| + # '': -4,
|
| + # }
|
| + # }
|
| + project_classifier = ndb.JsonProperty(indexed=False, default={})
|
| +
|
| + # Component classifier settings:
|
| + # {
|
| + # # Number of frames on top to consider when deciding the crashed
|
| + # #component.
|
| + # "top_n": 4,
|
| + # "path_function_component": [
|
| + # (r'src/third_party/WebKit/Source/core/layout', , 'Blink>Layout'),
|
| + # ...
|
| + # ]
|
| + # }
|
| + component_classifier = ndb.JsonProperty(indexed=False, default={})
|
| +
|
| + @property
|
| + def parsed_component_classifier(self):
|
| + setting = copy.copy(self.component_classifier)
|
| + setting['top_n'] = int(setting['top_n'])
|
| +
|
| + path_function_component = []
|
| + for path, function, component in setting['path_function_component']:
|
| + path_function_component.append((
|
| + re.compile(path),
|
| + re.compile(function) if function else None,
|
| + component))
|
| + setting['path_function_component'] = path_function_component
|
| +
|
| + return setting
|
|
|