HBASE-15807 - Update report-flakies.py to look for "FAILED" status in test report. - Remove duplicate testcase names in the result
Tested: Ran it manually. (Apekshit) Change-Id: I2a7751eefe729b2a69c0f78596f72b6a0eb39b66 Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
b75b226804
commit
2eced6f039
|
@ -99,7 +99,8 @@ for job_url in jobs_list:
|
||||||
bad_tests = set()
|
bad_tests = set()
|
||||||
for build in build_id_to_results:
|
for build in build_id_to_results:
|
||||||
for test in build_id_to_results[build]:
|
for test in build_id_to_results[build]:
|
||||||
if build_id_to_results[build][test] == "REGRESSION":
|
if (build_id_to_results[build][test] == "REGRESSION"
|
||||||
|
or build_id_to_results[build][test] == "FAILED"):
|
||||||
bad_tests.add(test)
|
bad_tests.add(test)
|
||||||
global_bad_tests.add(test)
|
global_bad_tests.add(test)
|
||||||
|
|
||||||
|
@ -123,7 +124,7 @@ for job_url in jobs_list:
|
||||||
print "{:>100} {:6} {:10} {:2.0f}%".format(bad_test, fail, total, fail*100.0/total)
|
print "{:>100} {:6} {:10} {:2.0f}%".format(bad_test, fail, total, fail*100.0/total)
|
||||||
else:
|
else:
|
||||||
print "No flaky tests founds."
|
print "No flaky tests founds."
|
||||||
if len(builds_ids) == len(build_ids_without_result):
|
if len(build_ids) == len(build_ids_without_result):
|
||||||
print "None of the analyzed builds have test result."
|
print "None of the analyzed builds have test result."
|
||||||
|
|
||||||
print "Builds analyzed: " + str(build_ids)
|
print "Builds analyzed: " + str(build_ids)
|
||||||
|
@ -131,16 +132,21 @@ for job_url in jobs_list:
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
if args.mvn:
|
if args.mvn:
|
||||||
includes = ""
|
# There might be multiple tests failing within each TestCase, avoid duplication of TestCase names.
|
||||||
excludes = ""
|
test_cases = set()
|
||||||
for test in global_bad_tests:
|
for test in global_bad_tests:
|
||||||
test = re.sub(".*\.", "", test) # Remove package name prefix.
|
test = re.sub(".*\.", "", test) # Remove package name prefix.
|
||||||
test = re.sub("#.*", "", test) # Remove individual unittest's name
|
test = re.sub("#.*", "", test) # Remove individual unittest's name
|
||||||
includes += test + ","
|
test_cases.add(test)
|
||||||
excludes += "**/" + test + ".java,"
|
|
||||||
|
includes = ",".join(test_cases)
|
||||||
with open("./includes", "w") as inc_file:
|
with open("./includes", "w") as inc_file:
|
||||||
inc_file.write(includes)
|
inc_file.write(includes)
|
||||||
inc_file.close()
|
inc_file.close()
|
||||||
|
|
||||||
|
excludes = ""
|
||||||
|
for test_case in test_cases:
|
||||||
|
excludes += "**/" + test_case + ".java,"
|
||||||
with open("./excludes", "w") as exc_file:
|
with open("./excludes", "w") as exc_file:
|
||||||
exc_file.write(excludes)
|
exc_file.write(excludes)
|
||||||
exc_file.close()
|
exc_file.close()
|
||||||
|
|
Loading…
Reference in New Issue