mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
tool/metrics: fix path cleanup for buildbot
This commit is contained in:
parent
eaaad3b7fb
commit
b5a8309e17
@ -96,6 +96,11 @@ def analyze_folders(btstack_root, folders):
|
|||||||
function_metrics = {}
|
function_metrics = {}
|
||||||
for key, value in zip(fields, row):
|
for key, value in zip(fields, row):
|
||||||
if key == 'file':
|
if key == 'file':
|
||||||
|
# get rid of directory traversal on buildbot
|
||||||
|
pos_metrics_folder = value.find('tool/metrics/')
|
||||||
|
if pos_metrics_folder > 0:
|
||||||
|
value = value[pos_metrics_folder+13:]
|
||||||
|
# streamline path
|
||||||
file = value.replace('../../','')
|
file = value.replace('../../','')
|
||||||
continue
|
continue
|
||||||
if key == 'function':
|
if key == 'function':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user