Repository: hbase
Updated Branches:
  refs/heads/master b75b22680 -> 2eced6f03


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 <st...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2eced6f0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2eced6f0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2eced6f0

Branch: refs/heads/master
Commit: 2eced6f0393abbc6ebbe6d37fffe0184e7255457
Parents: b75b226
Author: Apekshit <apeksha...@gmail.com>
Authored: Mon May 9 11:02:06 2016 -0700
Committer: stack <st...@apache.org>
Committed: Mon May 9 11:51:16 2016 -0700

----------------------------------------------------------------------
 dev-support/report-flakies.py | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2eced6f0/dev-support/report-flakies.py
----------------------------------------------------------------------
diff --git a/dev-support/report-flakies.py b/dev-support/report-flakies.py
index 65faa7c..e5e66cc 100755
--- a/dev-support/report-flakies.py
+++ b/dev-support/report-flakies.py
@@ -99,7 +99,8 @@ for job_url in jobs_list:
     bad_tests = set()
     for build in build_id_to_results:
         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)
                 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)
     else:
         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 "Builds analyzed: " + str(build_ids)
@@ -131,16 +132,21 @@ for job_url in jobs_list:
     print ""
 
 if args.mvn:
-    includes = ""
-    excludes = ""
+    # There might be multiple tests failing within each TestCase, avoid 
duplication of TestCase names.
+    test_cases = set()
     for test in global_bad_tests:
         test = re.sub(".*\.", "", test)  # Remove package name prefix.
         test = re.sub("#.*", "", test)  # Remove individual unittest's name
-        includes += test + ","
-        excludes += "**/" + test + ".java,"
+        test_cases.add(test)
+
+    includes = ",".join(test_cases)
     with open("./includes", "w") as inc_file:
         inc_file.write(includes)
         inc_file.close()
+
+    excludes = ""
+    for test_case in test_cases:
+        excludes += "**/" + test_case + ".java,"
     with open("./excludes", "w") as exc_file:
         exc_file.write(excludes)
         exc_file.close()

Reply via email to