Skip to contentSkip to conversation

Fixes to build perf test reporting

PATCH New Markus Lehtonen 1 participant 4 messages Apr 7, 2017

lore
Share & tools
lore
#0 lore raw

cover Fixes to build perf test reporting

Three miscellaneous one-liners fixing minor issues in build performance test reporting scripts.

Markus Lehtonen (3):
build-perf-test-wrapper.sh: support extra args for email script oe-build-perf-report-email.py: use proper fallback email address scripts/oe-build-perf-report: improve guessing of args

 scripts/contrib/build-perf-test-wrapper.sh    | 2 +-
 scripts/contrib/oe-build-perf-report-email.py | 4 +++-
 scripts/oe-build-perf-report                  | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.12.0
#1 lore raw

PATCH 1/3 build-perf-test-wrapper.sh: support extra args for email script

Make it possible to provide (extra) command line arguments to the oe-build-perf-test-email script via a new environment variable OE_BUILD_PERF_REPORT_EMAIL_EXTRA_ARGS.

---
 scripts/contrib/build-perf-test-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/contrib/build-perf-test-wrapper.sh +1 -1
index 49bc298c5b..3da32532be 100755
@@ -193,7 +193,7 @@ if [ -n "$results_repo" ]; then
         os_name=`get_os_release_var PRETTY_NAME`
         oe-build-perf-report -r "$results_repo" > report.txt
         oe-build-perf-report -r "$results_repo" --html > report.html
-        "$script_dir"/oe-build-perf-report-email.py --to "$email_to" --subject "Build Perf Test Report for $os_name" --text report.txt --html report.html
+        "$script_dir"/oe-build-perf-report-email.py --to "$email_to" --subject "Build Perf Test Report for $os_name" --text report.txt --html report.html "${OE_BUILD_PERF_REPORT_EMAIL_EXTRA_ARGS[@]}"
     fi
 fi
 
Signature · 1 line
2.12.0
#2 lore raw

PATCH 2/3 oe-build-perf-report-email.py: use proper fallback email address

In reply to Markus Lehtonen

Use properly formatted fallback email address instead of just the username.

---
 scripts/contrib/oe-build-perf-report-email.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/contrib/oe-build-perf-report-email.py +3 -1
index 81b58ab020..055a7b12cf 100755
@@ -21,6 +21,7 @@ import pwd
 import re
 import shutil
 import smtplib
+import socket
 import subprocess
 import sys
 import tempfile
@@ -211,7 +212,8 @@ def send_email(text_fn, html_fn, subject, recipients):
         raise ReportError("Neither plain text nor html body specified")
 
     full_name = pwd.getpwuid(os.getuid()).pw_gecos.split(',')[0]
-    email = os.environ.get('EMAIL', os.getlogin())
+    email = os.environ.get('EMAIL',
+                           '{}@{}'.format(os.getlogin(), socket.getfqdn()))
     msg['From'] = "{} <{}>".format(full_name, email)
     msg['To'] = ', '.join(recipients)
     msg['Subject'] = subject
Signature · 1 line
2.12.0
#3 lore raw

PATCH 3/3 scripts/oe-build-perf-report: improve guessing of args

In reply to Markus Lehtonen

Search remote branches, too, when finding the latest commit.

---
 scripts/oe-build-perf-report | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/oe-build-perf-report +1 -1
index 6f2db49d5c..ced5ff2e12 100755
@@ -380,7 +380,7 @@ def auto_args(repo, args):
     """Guess arguments, if not defined by the user"""
     # Get the latest commit in the repo
     log.debug("Guessing arguments from the latest commit")
-    msg = repo.run_cmd(['log', '-1', '--branches', '--format=%b'])
+    msg = repo.run_cmd(['log', '-1', '--branches', '--remotes', '--format=%b'])
     for line in msg.splitlines():
         split = line.split(':', 1)
         if len(split) != 2:
Signature · 1 line
2.12.0