5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 20:32:17 +08:00

SQOOP-2158: Sqoop2: Pre-Commit hook is incorrectly counting number of executed tests

(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2015-03-02 18:12:45 -08:00
parent a375d462df
commit 337266b9fc

View File

@ -278,7 +278,7 @@ def run_mvn_test(command, test_type, result, output_dir, slow):
fd = open("%s/test_%s.txt" % (output_dir, test_file_name))
for line in fd:
if "Tests run:" in line:
matcher = re.search("^Tests run: ([0-9+]), Failures: ([0-9+]), Errors: ([0-9+]), Skipped: ([0-9+]), Time elapsed:", line)
matcher = re.search("^Tests run: ([0-9+]), Failures: ([0-9]+), Errors: ([0-9]+), Skipped: ([0-9]+), Time elapsed:", line)
if matcher:
executed_tests += int(matcher.group(1))
fd.close()