added fail counters to the top of the message body
This commit is contained in:
49
alloy.py
49
alloy.py
@@ -88,9 +88,8 @@ def try_do_LLVM(text, command, from_validation):
|
|||||||
print_debug("ERROR.\n", from_validation, alloy_build)
|
print_debug("ERROR.\n", from_validation, alloy_build)
|
||||||
if options.notify != "":
|
if options.notify != "":
|
||||||
msg = MIMEMultipart()
|
msg = MIMEMultipart()
|
||||||
attach_mail_file(msg, alloy_build, "alloy_build.log", 400)
|
|
||||||
attach_mail_file(msg, stability_log, "stability.log")
|
attach_mail_file(msg, stability_log, "stability.log")
|
||||||
send_mail("Error while executing " + command + ". Examine logs for more information.", msg)
|
send_mail("ERROR: Error while executing " + command + ". Examine logs for more information.", msg)
|
||||||
error("can't " + text, 1)
|
error("can't " + text, 1)
|
||||||
print_debug("DONE.\n", from_validation, alloy_build)
|
print_debug("DONE.\n", from_validation, alloy_build)
|
||||||
|
|
||||||
@@ -104,7 +103,6 @@ def build_LLVM(version_LLVM, revision, folder, tarball, debug, selfbuild, extra,
|
|||||||
current_path = os.getcwd()
|
current_path = os.getcwd()
|
||||||
llvm_home = os.environ["LLVM_HOME"]
|
llvm_home = os.environ["LLVM_HOME"]
|
||||||
|
|
||||||
|
|
||||||
make_sure_dir_exists(llvm_home)
|
make_sure_dir_exists(llvm_home)
|
||||||
|
|
||||||
os.chdir(llvm_home)
|
os.chdir(llvm_home)
|
||||||
@@ -331,13 +329,24 @@ def build_ispc(version_LLVM, make):
|
|||||||
if options.debug == True:
|
if options.debug == True:
|
||||||
folder += "dbg"
|
folder += "dbg"
|
||||||
|
|
||||||
|
|
||||||
|
llvm_rev = ""
|
||||||
|
# determine LLVM revision
|
||||||
p = subprocess.Popen("svn info " + folder, shell=True, \
|
p = subprocess.Popen("svn info " + folder, shell=True, \
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
(info_llvm, err) = p.communicate()
|
(info_llvm, err) = p.communicate()
|
||||||
info_llvm = re.split('\n', info_llvm)
|
info_llvm = re.split('\n', info_llvm)
|
||||||
for i in info_llvm:
|
for i in info_llvm:
|
||||||
if len(i) > 0 and i.startswith("Last Changed Rev: "):
|
if len(i) > 0 and i.startswith("Last Changed Rev: "):
|
||||||
common.ex_state.switch_revision(str(i[len("Last Changed Rev: "):]))
|
llvm_rev = str(i[len("Last Changed Rev: "):])
|
||||||
|
|
||||||
|
if llvm_rev != "":
|
||||||
|
common.ex_state.switch_revision(llvm_rev)
|
||||||
|
print_debug("\n----------------------------------------\nBuilding ISPC with LLVM" \
|
||||||
|
+ llvm_rev + ":\n", False, stability_log)
|
||||||
|
else:
|
||||||
|
print_debug("Unable to retrieve LLVM revision\n", False, stability_log)
|
||||||
|
raise
|
||||||
|
|
||||||
try_do_LLVM("recognize LLVM revision", "svn info " + folder, True)
|
try_do_LLVM("recognize LLVM revision", "svn info " + folder, True)
|
||||||
try_do_LLVM("build ISPC with LLVM version " + version_LLVM + " ", make_ispc, True)
|
try_do_LLVM("build ISPC with LLVM version " + version_LLVM + " ", make_ispc, True)
|
||||||
@@ -448,6 +457,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
|||||||
date = datetime.datetime.now()
|
date = datetime.datetime.now()
|
||||||
print_debug("Date: " + date.strftime('%H:%M %d/%m/%Y') + "\n", False, "")
|
print_debug("Date: " + date.strftime('%H:%M %d/%m/%Y') + "\n", False, "")
|
||||||
newest_LLVM="3.4"
|
newest_LLVM="3.4"
|
||||||
|
msg_additional_info = ""
|
||||||
# *** *** ***
|
# *** *** ***
|
||||||
# Stability validation run
|
# Stability validation run
|
||||||
# *** *** ***
|
# *** *** ***
|
||||||
@@ -585,7 +595,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
|||||||
try:
|
try:
|
||||||
execute_stability(stability, R_tmp, print_version)
|
execute_stability(stability, R_tmp, print_version)
|
||||||
except:
|
except:
|
||||||
print_debug("Exception in execute_stability - maybe some test subprocess terminated before it should have\n", False, stability_log)
|
print_debug("ERROR: Exception in execute_stability - maybe some test subprocess terminated before it should have\n", False, stability_log)
|
||||||
print_version = 0
|
print_version = 0
|
||||||
for j in range(0,len(sde_targets)):
|
for j in range(0,len(sde_targets)):
|
||||||
stability.target = sde_targets[j][1]
|
stability.target = sde_targets[j][1]
|
||||||
@@ -600,14 +610,18 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
|||||||
# Output testing results separate for each tested LLVM version
|
# Output testing results separate for each tested LLVM version
|
||||||
R = concatenate_test_results(R, R_tmp)
|
R = concatenate_test_results(R, R_tmp)
|
||||||
output_test_results(R_tmp)
|
output_test_results(R_tmp)
|
||||||
|
print_debug("\n", False, stability_log)
|
||||||
# run special tests like embree
|
# run special tests like embree
|
||||||
#
|
#
|
||||||
run_special_tests() # dead code?
|
run_special_tests() # dead code?
|
||||||
|
|
||||||
print_debug("\n\nTOTAL:\n", False, stability_log)
|
print_debug("\n----------------------------------------\nTOTAL:\n", False, stability_log)
|
||||||
output_test_results(R)
|
output_test_results(R)
|
||||||
print_debug("__________________Watch stability.log for details_________________\n", False, stability_log)
|
print_debug("__________________Watch stability.log for details_________________\n", False, stability_log)
|
||||||
if options.notify != "":
|
if options.notify != "":
|
||||||
|
# e-mail header for performance test:
|
||||||
|
msg_additional_info += "New runfails(%d) New compfails(%d) New passes runfails(%d)" + \
|
||||||
|
"New passes compfails(%d)" % (len(R[0][0]), len(R[1][0]), len(R[2][0]), len(R[3][0]))
|
||||||
attach_mail_file(msg, stability.in_file, "run_tests_log.log", 100)
|
attach_mail_file(msg, stability.in_file, "run_tests_log.log", 100)
|
||||||
attach_mail_file(msg, stability_log, "stability.log")
|
attach_mail_file(msg, stability_log, "stability.log")
|
||||||
|
|
||||||
@@ -674,23 +688,30 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
|||||||
attach_mail_file(msg, "." + os.sep + "logs" + os.sep + "perf_build.log", "perf_build.log")
|
attach_mail_file(msg, "." + os.sep + "logs" + os.sep + "perf_build.log", "perf_build.log")
|
||||||
# dumping gathered info to the file
|
# dumping gathered info to the file
|
||||||
common.ex_state.dump(alloy_folder + "test_table.dump", common.ex_state.tt)
|
common.ex_state.dump(alloy_folder + "test_table.dump", common.ex_state.tt)
|
||||||
|
|
||||||
# sending e-mail with results
|
# sending e-mail with results
|
||||||
if options.notify != "":
|
if options.notify != "":
|
||||||
|
send_mail(msg_additional_info, msg)
|
||||||
|
|
||||||
|
def send_mail(body_header, msg):
|
||||||
|
try:
|
||||||
fp = open(os.environ["ISPC_HOME"] + os.sep + "notify_log.log", 'rb')
|
fp = open(os.environ["ISPC_HOME"] + os.sep + "notify_log.log", 'rb')
|
||||||
f_lines = fp.readlines()
|
f_lines = fp.readlines()
|
||||||
fp.close()
|
fp.close()
|
||||||
body = ""
|
except:
|
||||||
body += "Hostname: " + common.get_host_name() + "\n\n"
|
body_header += "\nUnable to open notify_log.log: " + str(sys.exc_info()) + "\n"
|
||||||
|
print_debug("Unable to open notify_log.log: " + str(sys.exc_info()) + "\n", False, stability_log)
|
||||||
|
|
||||||
|
body = "Hostname: " + common.get_host_name() + "\n\n"
|
||||||
|
|
||||||
if not sys.exc_info()[0] == None:
|
if not sys.exc_info()[0] == None:
|
||||||
body = body + "Last exception: " + str(sys.exc_info()) + '\n'
|
body += "ERROR: Exception(last) - " + str(sys.exc_info()) + '\n'
|
||||||
for i in range(0, len(f_lines)):
|
for i in range(0, len(f_lines)):
|
||||||
body = body + f_lines[i][:-1]
|
body += f_lines[i][:-1]
|
||||||
body = body + ' \n'
|
body += ' \n'
|
||||||
attach_mail_file(msg, alloy_build, "alloy_build.log", 100)
|
|
||||||
send_mail(body, msg)
|
|
||||||
|
|
||||||
def send_mail(body, msg):
|
body += body_header + '\n'
|
||||||
|
attach_mail_file(msg, alloy_build, "alloy_build.log", 100) # build.log is always being sent
|
||||||
smtp_server = os.environ["SMTP_ISPC"]
|
smtp_server = os.environ["SMTP_ISPC"]
|
||||||
msg['Subject'] = "ISPC test system results"
|
msg['Subject'] = "ISPC test system results"
|
||||||
msg['From'] = "ISPC_test_system"
|
msg['From'] = "ISPC_test_system"
|
||||||
|
|||||||
Reference in New Issue
Block a user