mirror of
https://github.com/apache/sqoop.git
synced 2025-05-07 05:11:58 +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:
parent
a375d462df
commit
337266b9fc
@ -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))
|
fd = open("%s/test_%s.txt" % (output_dir, test_file_name))
|
||||||
for line in fd:
|
for line in fd:
|
||||||
if "Tests run:" in line:
|
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:
|
if matcher:
|
||||||
executed_tests += int(matcher.group(1))
|
executed_tests += int(matcher.group(1))
|
||||||
fd.close()
|
fd.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user