Skip to contentSkip to conversation

oe-build-perf-report: Allow branch without hostname

PATCH New Richard Purdie 1 participant 2 messages Feb 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 oe-build-perf-report: Allow branch without hostname

Allow the branch to be set without the hostname option. Previously if hostname wasn't set, branch would be overwritten regardless of whether it was set or not.

---
 scripts/oe-build-perf-report | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/oe-build-perf-report +2 -2
index 0bd05f44ef0..c91f74192b3 100755
@@ -512,10 +512,10 @@ def auto_args(repo, args):
 
         key = split[0]
         val = split[1].strip()
-        if key == 'hostname':
+        if key == 'hostname' and not args.hostname:
             log.debug("Using hostname %s", val)
             args.hostname = val
-        elif key == 'branch':
+        elif key == 'branch' and not args.branch:
             log.debug("Using branch %s", val)
             args.branch = val
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 oe-build-perf-report: Allow commits from different branches

The code won't currently allow comparisions of two commits on different branches even if the commits are specified by their hashes.

This updates the code to search two branches for any relavent commits, hence allowing comparisions to be made. A particularly useful case is master vs. master-next for example.

---
 scripts/oe-build-perf-report | 5 +++++
 1 file changed, 5 insertions(+)
scripts/oe-build-perf-report +5 -0
index c91f74192b3..b7b09391cb8 100755
@@ -542,6 +542,7 @@ Examine build performance test results from a Git repository"""
                        help="Tag name (pattern) for finding results")
     group.add_argument('--hostname', '-H')
     group.add_argument('--branch', '-B', default='master')
+    group.add_argument('--branch2')
     group.add_argument('--machine', default='qemux86')
     group.add_argument('--history-length', default=25, type=int,
                        help="Number of tested revisions to plot in html report")
@@ -579,6 +580,10 @@ def main(argv=None):
 
     revs = get_test_revs(repo, args.tag_name, hostname=args.hostname,
                          branch=args.branch, machine=args.machine)
+    if args.branch2:
+        revs = revs + get_test_revs(repo, args.tag_name, hostname=args.hostname,
+                             branch=args.branch2, machine=args.machine)
+
     if len(revs) < 2:
         log.error("%d tester revisions found, unable to generate report",
                   len(revs))
Signature · 1 line
2.20.1