[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5495/8267] build-perf-test-wrapper.sh: support sending email reports
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 5495/8267] build-perf-test-wrapper.sh: support sending email reports
- Date: Sun, 17 Dec 2017 03:31:13 +0000 (UTC)
commit 86eaa6d83f4c8d9009a483578e0abd3add7e562a
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: Mon Apr 3 18:58:39 2017 +0300
build-perf-test-wrapper.sh: support sending email reports
Add new '-E' command line option for sending an email report to
specified recipient.
(From OE-Core rev: 46e76ffd460933ab35da4cfd3509f7c5de5ecd93)
Signed-off-by: Markus Lehtonen <markus lehtonen linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/contrib/build-perf-test-wrapper.sh | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index c847197..49bc298 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -19,6 +19,7 @@
# oe-build-perf-test and archives the results.
script=`basename $0`
+script_dir=$(realpath $(dirname $0))
archive_dir=~/perf-results/archives
usage () {
@@ -32,6 +33,7 @@ Optional arguments:
-c COMMITISH test (checkout) this commit, <branch>:<commit> can be
specified to test specific commit of certain branch
-C GIT_REPO commit results into Git
+ -E EMAIL_ADDR send email report
-P GIT_REMOTE push results to a remote Git repository
-w WORK_DIR work dir for this script
(default: GIT_TOP_DIR/build-perf-test)
@@ -39,12 +41,16 @@ Optional arguments:
EOF
}
+get_os_release_var () {
+ ( source /etc/os-release; eval echo '$'$1 )
+}
+
# Parse command line arguments
commitish=""
oe_build_perf_test_extra_opts=()
oe_git_archive_extra_opts=()
-while getopts "ha:c:C:P:w:x" opt; do
+while getopts "ha:c:C:E:P:w:x" opt; do
case $opt in
h) usage
exit 0
@@ -55,6 +61,8 @@ while getopts "ha:c:C:P:w:x" opt; do
;;
C) results_repo=`realpath -s "$OPTARG"`
;;
+ E) email_to="$OPTARG"
+ ;;
P) oe_git_archive_extra_opts+=("--push" "$OPTARG")
;;
w) base_dir=`realpath -s "$OPTARG"`
@@ -178,8 +186,18 @@ if [ -n "$results_repo" ]; then
--notes "buildstats/{branch_name}" "$results_dir/buildstats.json" \
"${oe_git_archive_extra_opts[@]}" \
"$results_dir"
+
+ # Send email report
+ if [ -n "$email_to" ]; then
+ echo -e "\nEmailing test report"
+ 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
+ fi
fi
+
echo -ne "\n\n-----------------\n"
echo "Global results file:"
echo -ne "\n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]