From 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 7 Nov 2025 13:31:53 +0000 Subject: The poky repository master branch is no longer being updated. You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie --- scripts/contrib/oe-build-perf-report-email.py | 121 -------------------------- 1 file changed, 121 deletions(-) delete mode 100755 scripts/contrib/oe-build-perf-report-email.py (limited to 'scripts/contrib/oe-build-perf-report-email.py') diff --git a/scripts/contrib/oe-build-perf-report-email.py b/scripts/contrib/oe-build-perf-report-email.py deleted file mode 100755 index 7192113c28..0000000000 --- a/scripts/contrib/oe-build-perf-report-email.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/python3 -# -# Send build performance test report emails -# -# Copyright (c) 2017, Intel Corporation. -# -# SPDX-License-Identifier: GPL-2.0-only -# - -import argparse -import base64 -import logging -import os -import pwd -import re -import shutil -import smtplib -import socket -import subprocess -import sys -import tempfile -from email.mime.text import MIMEText - - -# Setup logging -logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") -log = logging.getLogger('oe-build-perf-report') - - -def parse_args(argv): - """Parse command line arguments""" - description = """Email build perf test report""" - parser = argparse.ArgumentParser( - formatter_class=argparse.ArgumentDefaultsHelpFormatter, - description=description) - - parser.add_argument('--debug', '-d', action='store_true', - help="Verbose logging") - parser.add_argument('--quiet', '-q', action='store_true', - help="Only print errors") - parser.add_argument('--to', action='append', - help="Recipients of the email") - parser.add_argument('--cc', action='append', - help="Carbon copy recipients of the email") - parser.add_argument('--bcc', action='append', - help="Blind carbon copy recipients of the email") - parser.add_argument('--subject', default="Yocto build perf test report", - help="Email subject") - parser.add_argument('--outdir', '-o', - help="Store files in OUTDIR. Can be used to preserve " - "the email parts") - parser.add_argument('--text', - help="Plain text message") - - args = parser.parse_args(argv) - - if not args.text: - parser.error("Please specify --text") - - return args - - -def send_email(text_fn, subject, recipients, copy=[], blind_copy=[]): - # Generate email message - with open(text_fn) as f: - msg = MIMEText("Yocto build performance test report.\n" + f.read(), 'plain') - - pw_data = pwd.getpwuid(os.getuid()) - full_name = pw_data.pw_gecos.split(',')[0] - email = os.environ.get('EMAIL', - '{}@{}'.format(pw_data.pw_name, socket.getfqdn())) - msg['From'] = "{} <{}>".format(full_name, email) - msg['To'] = ', '.join(recipients) - if copy: - msg['Cc'] = ', '.join(copy) - if blind_copy: - msg['Bcc'] = ', '.join(blind_copy) - msg['Subject'] = subject - - # Send email - with smtplib.SMTP('localhost') as smtp: - smtp.send_message(msg) - - -def main(argv=None): - """Script entry point""" - args = parse_args(argv) - if args.quiet: - log.setLevel(logging.ERROR) - if args.debug: - log.setLevel(logging.DEBUG) - - if args.outdir: - outdir = args.outdir - if not os.path.exists(outdir): - os.mkdir(outdir) - else: - outdir = tempfile.mkdtemp(dir='.') - - try: - log.debug("Storing email parts in %s", outdir) - if args.to: - log.info("Sending email to %s", ', '.join(args.to)) - if args.cc: - log.info("Copying to %s", ', '.join(args.cc)) - if args.bcc: - log.info("Blind copying to %s", ', '.join(args.bcc)) - send_email(args.text, args.subject, args.to, args.cc, args.bcc) - except subprocess.CalledProcessError as err: - log.error("%s, with output:\n%s", str(err), err.output.decode()) - return 1 - finally: - if not args.outdir: - log.debug("Wiping %s", outdir) - shutil.rmtree(outdir) - - return 0 - - -if __name__ == "__main__": - sys.exit(main()) -- cgit v1.2.3-54-g00ecf