summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/build_perf/html/measurement_chart.html140
-rw-r--r--scripts/lib/build_perf/html/report.html124
-rw-r--r--scripts/lib/build_perf/report.py5
-rwxr-xr-xscripts/lib/devtool/ide_sdk.py2
-rw-r--r--scripts/lib/devtool/standard.py41
-rw-r--r--scripts/lib/recipetool/append.py6
-rw-r--r--scripts/lib/recipetool/create_go.py34
-rw-r--r--scripts/lib/wic/plugins/source/rootfs.py2
-rwxr-xr-xscripts/oe-build-perf-report6
-rwxr-xr-xscripts/oe-debuginfod17
-rwxr-xr-xscripts/oe-setup-build11
11 files changed, 270 insertions, 118 deletions
diff --git a/scripts/lib/build_perf/html/measurement_chart.html b/scripts/lib/build_perf/html/measurement_chart.html
index 65f1a227ad..ad4a93ed02 100644
--- a/scripts/lib/build_perf/html/measurement_chart.html
+++ b/scripts/lib/build_perf/html/measurement_chart.html
@@ -1,50 +1,100 @@
-<script type="text/javascript">
- chartsDrawing += 1;
- google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }});
- function drawChart_{{ chart_elem_id }}() {
- var data = new google.visualization.DataTable();
+<script type="module">
+ // Get raw data
+ const rawData = [
+ {% for sample in measurement.samples %}
+ [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}, {{ sample.start_time }}],
+ {% endfor %}
+ ];
- // Chart options
- var options = {
- theme : 'material',
- legend: 'none',
- hAxis: { format: '', title: 'Commit number',
- minValue: {{ chart_opts.haxis.min }},
- maxValue: {{ chart_opts.haxis.max }} },
- {% if measurement.type == 'time' %}
- vAxis: { format: 'h:mm:ss' },
- {% else %}
- vAxis: { format: '' },
- {% endif %}
- pointSize: 5,
- chartArea: { left: 80, right: 15 },
- };
+ const convertToMinute = (time) => {
+ return time[0]*60 + time[1] + time[2]/60 + time[3]/3600;
+ }
- // Define data columns
- data.addColumn('number', 'Commit');
- data.addColumn('{{ measurement.value_type.gv_data_type }}',
- '{{ measurement.value_type.quantity }}');
- // Add data rows
- data.addRows([
- {% for sample in measurement.samples %}
- [{{ sample.commit_num }}, {{ sample.mean.gv_value() }}],
- {% endfor %}
- ]);
+ // Update value format to either minutes or leave as size value
+ const updateValue = (value) => {
+ // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
+ return Array.isArray(value) ? convertToMinute(value) : value
+ }
- // Finally, draw the chart
- chart_div = document.getElementById('{{ chart_elem_id }}');
- var chart = new google.visualization.LineChart(chart_div);
- google.visualization.events.addListener(chart, 'ready', function () {
- //chart_div = document.getElementById('{{ chart_elem_id }}');
- //chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';
- png_div = document.getElementById('{{ chart_elem_id }}_png');
- png_div.outerHTML = '<a id="{{ chart_elem_id }}_png" href="' + chart.getImageURI() + '">PNG</a>';
- console.log("CHART READY: {{ chart_elem_id }}");
- chartsDrawing -= 1;
- if (chartsDrawing == 0)
- console.log("ALL CHARTS READY");
+ // Convert raw data to the format: [time, value]
+ const data = rawData.map(([commit, value, time]) => {
+ return [
+ // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000.
+ new Date(time * 1000).getTime(),
+ // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
+ updateValue(value)
+ ]
+ });
+
+ // Set chart options
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ valueFormatter: (value) => {
+ const commitNumber = rawData.filter(([commit, dataValue, time]) => updateValue(dataValue) === value)
+ if ('{{ measurement.value_type.quantity }}' == 'time') {
+ const hours = Math.floor(value/60)
+ const minutes = Math.floor(value % 60)
+ const seconds = Math.floor((value * 60) % 60)
+ return [
+ hours + ':' + minutes + ':' + seconds + ', ' +
+ 'commit number: ' + commitNumber[0][0]
+ ]
+ }
+ return [
+ value.toFixed(2) + ' MB' + ', ' +
+ 'commit number: ' + commitNumber[0][0]
+ ]
+ },
+
+ },
+ xAxis: {
+ type: 'time',
+ },
+ yAxis: {
+ name: '{{ measurement.value_type.quantity }}' == 'time' ? 'Duration in minutes' : 'Disk size in MB',
+ type: 'value',
+ min: function(value) {
+ return Math.round(value.min - 0.5);
+ },
+ max: function(value) {
+ return Math.round(value.max + 0.5);
+ }
+ },
+ dataZoom: [
+ {
+ type: 'slider',
+ xAxisIndex: 0,
+ filterMode: 'none'
+ },
+ ],
+ series: [
+ {
+ name: '{{ measurement.value_type.quantity }}',
+ type: 'line',
+ step: 'start',
+ symbol: 'none',
+ data: data
+ }
+ ]
+ };
+
+ // Draw chart
+ const chart_div = document.getElementById('{{ chart_elem_id }}');
+ // Set dark mode
+ let measurement_chart
+ if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+ measurement_chart= echarts.init(chart_div, 'dark', {
+ height: 320
});
- chart.draw(data, options);
-}
+ } else {
+ measurement_chart= echarts.init(chart_div, null, {
+ height: 320
+ });
+ }
+ // Change chart size with browser resize
+ window.addEventListener('resize', function() {
+ measurement_chart.resize();
+ });
+ measurement_chart.setOption(option);
</script>
-
diff --git a/scripts/lib/build_perf/html/report.html b/scripts/lib/build_perf/html/report.html
index d1ba6f2578..537ed3ee52 100644
--- a/scripts/lib/build_perf/html/report.html
+++ b/scripts/lib/build_perf/html/report.html
@@ -3,11 +3,7 @@
<head>
{# Scripts, for visualization#}
<!--START-OF-SCRIPTS-->
-<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
-<script type="text/javascript">
-google.charts.load('current', {'packages':['corechart']});
-var chartsDrawing = 0;
-</script>
+<script src=" https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js "></script>
{# Render measurement result charts #}
{% for test in test_data %}
@@ -23,28 +19,29 @@ var chartsDrawing = 0;
{# Styles #}
<style>
+:root {
+ --text: #000;
+ --bg: #fff;
+ --h2heading: #707070;
+ --link: #0000EE;
+ --trtopborder: #9ca3af;
+ --trborder: #e5e7eb;
+ --chartborder: #f0f0f0;
+ }
.meta-table {
font-size: 14px;
text-align: left;
border-collapse: collapse;
}
-.meta-table tr:nth-child(even){background-color: #f2f2f2}
-meta-table th, .meta-table td {
- padding: 4px;
-}
.summary {
- margin: 0;
font-size: 14px;
text-align: left;
border-collapse: collapse;
}
-summary th, .meta-table td {
- padding: 4px;
-}
.measurement {
padding: 8px 0px 8px 8px;
- border: 2px solid #f0f0f0;
- margin-bottom: 10px;
+ border: 2px solid var(--chartborder);
+ margin: 1.5rem 0;
}
.details {
margin: 0;
@@ -64,18 +61,71 @@ summary th, .meta-table td {
background-color: #f0f0f0;
margin-left: 10px;
}
-hr {
- color: #f0f0f0;
+.card-container {
+ border-bottom-width: 1px;
+ padding: 1.25rem 3rem;
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
+ border-radius: 0.25rem;
+}
+body {
+ font-family: 'Helvetica', sans-serif;
+ margin: 3rem 8rem;
+ background-color: var(--bg);
+ color: var(--text);
+}
+h1 {
+ text-align: center;
}
h2 {
- font-size: 20px;
+ font-size: 1.5rem;
margin-bottom: 0px;
- color: #707070;
+ color: var(--h2heading);
+ padding-top: 1.5rem;
}
h3 {
- font-size: 16px;
+ font-size: 1.3rem;
margin: 0px;
- color: #707070;
+ color: var(--h2heading);
+ padding: 1.5rem 0;
+}
+h4 {
+ font-size: 14px;
+ font-weight: lighter;
+ line-height: 1.2rem;
+ margin: auto;
+ padding-top: 1rem;
+}
+table {
+ margin-top: 1.5rem;
+ line-height: 2rem;
+}
+tr {
+ border-bottom: 1px solid var(--trborder);
+}
+tr:first-child {
+ border-bottom: 1px solid var(--trtopborder);
+}
+tr:last-child {
+ border-bottom: none;
+}
+a {
+ text-decoration: none;
+ font-weight: bold;
+ color: var(--link);
+}
+a:hover {
+ color: #8080ff;
+}
+@media (prefers-color-scheme: dark) {
+ :root {
+ --text: #e9e8fa;
+ --bg: #0F0C28;
+ --h2heading: #B8B7CB;
+ --link: #87cefa;
+ --trtopborder: #394150;
+ --trborder: #212936;
+ --chartborder: #b1b0bf;
+ }
}
</style>
@@ -83,13 +133,14 @@ h3 {
</head>
{% macro poky_link(commit) -%}
- <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a>
+ <a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?id={{ commit }}">{{ commit[0:11] }}</a>
{%- endmacro %}
-<body><div style="width: 700px">
+<body><div>
+ <h1 style="text-align: center;">Performance Test Report</h1>
{# Test metadata #}
<h2>General</h2>
- <hr>
+ <h4>The table provides an overview of the comparison between two selected commits from the same branch.</h4>
<table class="meta-table" style="width: 100%">
<tr>
<th></th>
@@ -112,19 +163,21 @@ h3 {
{# Test result summary #}
<h2>Test result summary</h2>
- <hr>
+ <h4>The test summary presents a thorough breakdown of each test conducted on the branch, including details such as build time and disk space consumption. Additionally, it gives insights into the average time taken for test execution, along with absolute and relative values for a better understanding.</h4>
<table class="summary" style="width: 100%">
+ <tr>
+ <th>Test name</th>
+ <th>Measurement description</th>
+ <th>Mean value</th>
+ <th>Absolute difference</th>
+ <th>Relative difference</th>
+ </tr>
{% for test in test_data %}
- {% if loop.index is even %}
- {% set row_style = 'style="background-color: #f2f2f2"' %}
- {% else %}
- {% set row_style = 'style="background-color: #ffffff"' %}
- {% endif %}
{% if test.status == 'SUCCESS' %}
{% for measurement in test.measurements %}
<tr {{ row_style }}>
{% if loop.index == 1 %}
- <td>{{ test.name }}: {{ test.description }}</td>
+ <td><a href=#{{test.name}}>{{ test.name }}: {{ test.description }}</a></td>
{% else %}
{# add empty cell in place of the test name#}
<td></td>
@@ -153,10 +206,12 @@ h3 {
</table>
{# Detailed test results #}
+ <h2>Test details</h2>
+ <h4>The following section provides details of each test, accompanied by charts representing build time and disk usage over time or by commit number.</h4>
{% for test in test_data %}
- <h2>{{ test.name }}: {{ test.description }}</h2>
- <hr>
+ <h3 style="color: #000;" id={{test.name}}>{{ test.name }}: {{ test.description }}</h3>
{% if test.status == 'SUCCESS' %}
+ <div class="card-container">
{% for measurement in test.measurements %}
<div class="measurement">
<h3>{{ measurement.description }}</h3>
@@ -275,7 +330,8 @@ h3 {
{% endif %}
{% endif %}
</div>
- {% endfor %}
+ {% endfor %}
+ </div>
{# Unsuccessful test #}
{% else %}
<span style="font-size: 150%; font-weight: bold; color: red;">{{ test.status }}
diff --git a/scripts/lib/build_perf/report.py b/scripts/lib/build_perf/report.py
index ab77424cc7..f4e6a92e09 100644
--- a/scripts/lib/build_perf/report.py
+++ b/scripts/lib/build_perf/report.py
@@ -294,7 +294,7 @@ class SizeVal(MeasurementVal):
return "null"
return self / 1024
-def measurement_stats(meas, prefix=''):
+def measurement_stats(meas, prefix='', time=0):
"""Get statistics of a measurement"""
if not meas:
return {prefix + 'sample_cnt': 0,
@@ -319,6 +319,8 @@ def measurement_stats(meas, prefix=''):
stats['quantity'] = val_cls.quantity
stats[prefix + 'sample_cnt'] = len(values)
+ # Add start time for both type sysres and disk usage
+ start_time = time
mean_val = val_cls(mean(values))
min_val = val_cls(min(values))
max_val = val_cls(max(values))
@@ -334,6 +336,7 @@ def measurement_stats(meas, prefix=''):
stats[prefix + 'max'] = max_val
stats[prefix + 'minus'] = val_cls(mean_val - min_val)
stats[prefix + 'plus'] = val_cls(max_val - mean_val)
+ stats[prefix + 'start_time'] = start_time
return stats
diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py
index 7807b322b3..65873b088d 100755
--- a/scripts/lib/devtool/ide_sdk.py
+++ b/scripts/lib/devtool/ide_sdk.py
@@ -1052,7 +1052,7 @@ def register_commands(subparsers, context):
parser_ide_sdk.add_argument(
'-I', '--key', help='Specify ssh private key for connection to the target')
parser_ide_sdk.add_argument(
- '--skip-bitbake', help='Generate IDE configuration but skip calling bibtake to update the SDK.', action='store_true')
+ '--skip-bitbake', help='Generate IDE configuration but skip calling bitbake to update the SDK', action='store_true')
parser_ide_sdk.add_argument(
'-k', '--bitbake-k', help='Pass -k parameter to bitbake', action='store_true')
parser_ide_sdk.add_argument(
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 6674e67267..05161942b7 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -661,7 +661,18 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
srctree_localdir = os.path.join(srctree, 'oe-local-files')
if sync:
- bb.process.run('git fetch file://' + srcsubdir + ' ' + devbranch + ':' + devbranch, cwd=srctree)
+ try:
+ logger.info('Backing up current %s branch as branch: %s.bak' % (devbranch, devbranch))
+ bb.process.run('git branch -f ' + devbranch + '.bak', cwd=srctree)
+
+ # Use git fetch to update the source with the current recipe
+ # To be able to update the currently checked out branch with
+ # possibly new history (no fast-forward) git needs to be told
+ # that's ok
+ logger.info('Syncing source files including patches to git branch: %s' % devbranch)
+ bb.process.run('git fetch --update-head-ok --force file://' + srcsubdir + ' ' + devbranch + ':' + devbranch, cwd=srctree)
+ except bb.process.ExecutionError as e:
+ raise DevtoolError("Error when syncing source files to local checkout: %s" % str(e))
# Move the oe-local-files directory to srctree.
# As oe-local-files is not part of the constructed git tree,
@@ -893,7 +904,10 @@ def modify(args, config, basepath, workspace):
(stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_revs["."], cwd=srctree)
commits["."] = stdout.split()
check_commits = True
- (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree)
+ try:
+ (stdout, _) = bb.process.run('git submodule --quiet foreach --recursive \'echo `git rev-parse devtool-base` $PWD\'', cwd=srctree)
+ except bb.process.ExecutionError:
+ stdout = ""
for line in stdout.splitlines():
(rev, submodule_path) = line.split()
submodule = os.path.relpath(submodule_path, srctree)
@@ -1452,8 +1466,10 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
1. updated - files that already exist in SRCURI
2. added - new files files that don't exist in SRCURI
3 removed - files that exist in SRCURI but not in exported files
- In each dict the key is the 'basepath' of the URI and value is the
- absolute path to the existing file in recipe space (if any).
+ In each dict the key is the 'basepath' of the URI and value is:
+ - for updated and added dicts, a dict with 1 optionnal key:
+ - 'path': the absolute path to the existing file in recipe space (if any)
+ - for removed dict, the absolute path to the existing file in recipe space
"""
import oe.recipeutils
@@ -1535,9 +1551,9 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
origpath = existing_files.pop(fname)
workpath = os.path.join(local_files_dir, fname)
if not filecmp.cmp(origpath, workpath):
- updated[fname] = origpath
+ updated[fname] = {'path' : origpath}
elif fname != '.gitignore':
- added[fname] = None
+ added[fname] = {}
workdir = rd.getVar('WORKDIR')
s = rd.getVar('S')
@@ -1554,7 +1570,7 @@ def _export_local_files(srctree, rd, destdir, srctreebase):
if os.path.exists(fpath):
origpath = existing_files.pop(fname)
if not filecmp.cmp(origpath, fpath):
- updated[fpath] = origpath
+ updated[fpath] = {'path' : origpath}
removed = existing_files
return (updated, added, removed)
@@ -1640,7 +1656,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
redirect_output=dry_run_outdir)
else:
files_dir = _determine_files_dir(rd)
- for basepath, path in upd_f.items():
+ for basepath, param in upd_f.items():
+ path = param['path']
logger.info('Updating file %s%s' % (basepath, dry_run_suffix))
if os.path.isabs(basepath):
# Original file (probably with subdir pointing inside source tree)
@@ -1650,7 +1667,8 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi
_move_file(os.path.join(local_files_dir, basepath), path,
dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
update_srcuri= True
- for basepath, path in new_f.items():
+ for basepath, param in new_f.items():
+ path = param['path']
logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
_move_file(os.path.join(local_files_dir, basepath),
os.path.join(files_dir, basepath),
@@ -1772,7 +1790,8 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
else:
# Update existing files
files_dir = _determine_files_dir(rd)
- for basepath, path in upd_f.items():
+ for basepath, param in upd_f.items():
+ path = param['path']
logger.info('Updating file %s' % basepath)
if os.path.isabs(basepath):
# Original file (probably with subdir pointing inside source tree)
@@ -1806,7 +1825,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
dry_run_outdir=dry_run_outdir, base_outdir=recipedir)
updatefiles = True
# Add any new files
- for basepath, path in new_f.items():
+ for basepath, param in new_f.items():
logger.info('Adding new file %s%s' % (basepath, dry_run_suffix))
_move_file(os.path.join(local_files_dir, basepath),
os.path.join(files_dir, basepath),
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 341e893305..10945d6008 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -101,7 +101,7 @@ def determine_file_source(targetpath, rd):
import oe.recipeutils
# See if it's in do_install for the recipe
- workdir = rd.getVar('WORKDIR')
+ unpackdir = rd.getVar('UNPACKDIR')
src_uri = rd.getVar('SRC_URI')
srcfile = ''
modpatches = []
@@ -113,9 +113,9 @@ def determine_file_source(targetpath, rd):
if not srcpath.startswith('/'):
# Handle non-absolute path
srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs').split()[-1], srcpath))
- if srcpath.startswith(workdir):
+ if srcpath.startswith(unpackdir):
# OK, now we have the source file name, look for it in SRC_URI
- workdirfile = os.path.relpath(srcpath, workdir)
+ workdirfile = os.path.relpath(srcpath, unpackdir)
# FIXME this is where we ought to have some code in the fetcher, because this is naive
for item in src_uri.split():
localpath = bb.fetch2.localpath(item, rd)
diff --git a/scripts/lib/recipetool/create_go.py b/scripts/lib/recipetool/create_go.py
index c560831442..a85a2f2786 100644
--- a/scripts/lib/recipetool/create_go.py
+++ b/scripts/lib/recipetool/create_go.py
@@ -16,7 +16,7 @@ from html.parser import HTMLParser
from recipetool.create import RecipeHandler, handle_license_vars
from recipetool.create import guess_license, tidy_licenses, fixup_license
from recipetool.create import determine_from_url
-from urllib.error import URLError
+from urllib.error import URLError, HTTPError
import bb.utils
import json
@@ -225,7 +225,7 @@ class GoRecipeHandler(RecipeHandler):
def __init__(self):
super().__init__()
- self.__srv = []
+ self.__srv = {}
def handle_starttag(self, tag, attrs):
if tag == 'meta' and list(
@@ -233,36 +233,34 @@ class GoRecipeHandler(RecipeHandler):
content = list(
filter(lambda a: (a[0] == 'content'), attrs))
if content:
- self.__srv = content[0][1].split()
+ srv = content[0][1].split()
+ self.__srv[srv[0]] = srv
- @property
- def import_prefix(self):
- return self.__srv[0] if len(self.__srv) else None
-
- @property
- def vcs(self):
- return self.__srv[1] if len(self.__srv) else None
-
- @property
- def repourl(self):
- return self.__srv[2] if len(self.__srv) else None
+ def go_import(self, modulepath):
+ if modulepath in self.__srv:
+ srv = self.__srv[modulepath]
+ return GoImport(srv[0], srv[1], srv[2], None)
+ return None
url = url.geturl() + "?go-get=1"
req = urllib.request.Request(url)
try:
- resp = urllib.request.urlopen(req)
-
+ body = urllib.request.urlopen(req).read()
+ except HTTPError as http_err:
+ logger.warning(
+ "Unclean status when fetching page from [%s]: %s", url, str(http_err))
+ body = http_err.fp.read()
except URLError as url_err:
logger.warning(
"Failed to fetch page from [%s]: %s", url, str(url_err))
return None
parser = GoImportHTMLParser()
- parser.feed(resp.read().decode('utf-8'))
+ parser.feed(body.decode('utf-8'))
parser.close()
- return GoImport(parser.import_prefix, parser.vcs, parser.repourl, None)
+ return parser.go_import(modulepath)
def __resolve_from_golang_proxy(self, modulepath, version):
"""
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index e29f3a4c2f..c990143c0d 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -43,7 +43,7 @@ class RootfsPlugin(SourcePlugin):
# directory, or modify a directory outside OpenEmbedded).
full_path = os.path.realpath(os.path.join(rootfs_dir, path))
if not full_path.startswith(os.path.realpath(rootfs_dir)):
- logger.error("%s: Must point inside the rootfs:" % (cmd, path))
+ logger.error("%s: Must point inside the rootfs: %s" % (cmd, path))
sys.exit(1)
return full_path
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index 7812ea4540..266700d294 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -336,7 +336,9 @@ def print_html_report(data, id_comp, buildstats):
test_i = test_data['tests'][test]
meas_i = test_i['measurements'][meas]
commit_num = get_data_item(meta, 'layers.meta.commit_count')
- samples.append(measurement_stats(meas_i))
+ # Add start_time for both test measurement types of sysres and disk usage
+ start_time = test_i['start_time'][0]
+ samples.append(measurement_stats(meas_i, '', start_time))
samples[-1]['commit_num'] = commit_num
absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean'])
@@ -473,7 +475,7 @@ Examine build performance test results from a Git repository"""
group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
group.add_argument('--branch2', help="Branch to find comparision revisions in")
group.add_argument('--machine', default='qemux86')
- group.add_argument('--history-length', default=25, type=int,
+ group.add_argument('--history-length', default=300, type=int,
help="Number of tested revisions to plot in html report")
group.add_argument('--commit',
help="Revision to search for")
diff --git a/scripts/oe-debuginfod b/scripts/oe-debuginfod
index b525310225..5e70d37b8b 100755
--- a/scripts/oe-debuginfod
+++ b/scripts/oe-debuginfod
@@ -15,14 +15,29 @@ scriptpath.add_bitbake_lib_path()
import bb.tinfoil
import subprocess
+import argparse
if __name__ == "__main__":
+ p = argparse.ArgumentParser()
+ p.add_argument("-d", action='store_true', \
+ help="store debuginfod files in project sub-directory")
+
+ args = p.parse_args()
+
with bb.tinfoil.Tinfoil() as tinfoil:
tinfoil.prepare(config_only=True)
package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper()
feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True)
+ opts = [ '--verbose', '-R', '-U', feed_dir ]
+
+ if args.d:
+ fdir = os.path.join(os.getcwd(), 'oedid-files')
+ os.makedirs(fdir, exist_ok=True)
+ opts += [ '-d', os.path.join(fdir, 'did.sqlite') ]
+
subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
- subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
+ subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod'] + opts)
+ # we should not get here
print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
diff --git a/scripts/oe-setup-build b/scripts/oe-setup-build
index 5364f2b481..c0476992a2 100755
--- a/scripts/oe-setup-build
+++ b/scripts/oe-setup-build
@@ -91,7 +91,16 @@ def setup_build_env(args):
builddir = args.b if args.b else template["buildpath"]
no_shell = args.no_shell
coredir = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
- cmd = "TEMPLATECONF={} . {} {}".format(template["templatepath"], os.path.join(coredir, 'oe-init-build-env'), builddir)
+ cmd_base = ". {} {}".format(os.path.join(coredir, 'oe-init-build-env'), os.path.abspath(builddir))
+
+ initbuild = os.path.join(builddir, 'init-build-env')
+ if not os.path.exists(initbuild):
+ os.makedirs(builddir, exist_ok=True)
+ with open(initbuild, 'w') as f:
+ f.write(cmd_base)
+ print("\nRun '. {}' to initialize the build in a current shell session.\n".format(initbuild))
+
+ cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base)
if not no_shell:
cmd = cmd + " && {}".format(os.environ['SHELL'])
print("Running:", cmd)