From d731de84ab3d10551f7b31be4e675feba061c3c4 Mon Sep 17 00:00:00 2001 From: inikep Date: Tue, 21 Jun 2016 11:26:17 +0200 Subject: [PATCH] test-zstd-speed.py: added send_simple_email --- tests/test-zstd-speed.py | 79 ++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/tests/test-zstd-speed.py b/tests/test-zstd-speed.py index 9a9a3992d..5cc07fb37 100755 --- a/tests/test-zstd-speed.py +++ b/tests/test-zstd-speed.py @@ -8,9 +8,9 @@ import time import traceback from subprocess import Popen, PIPE -repo_url = 'https://github.com/Cyan4973/zstd.git' +default_repo_url = 'https://github.com/Cyan4973/zstd.git' test_dir_name = 'speedTest' - +email_header = '[ZSTD_speedTest]' def log(text): print time.strftime("%Y/%m/%d %H:%M:%S") + ' - ' + text @@ -126,14 +126,23 @@ def benchmark_and_compare(branch, commit, resultsFileName, lastCLevel, testFileP return text +def send_simple_email(emails, email_topic, have_mutt, have_mail): + if have_mutt: + execute('mutt -s "' + email_header + ' ' + email_topic + '" ' + emails + '