mirror of
https://github.com/apache/sqoop.git
synced 2025-05-06 11:59:04 +08:00
Adding more status messages
This commit is contained in:
parent
a256cfcba9
commit
1b1bbfd96a
@ -183,6 +183,7 @@ def git_apply(result, cmd, patch_file, strip, output_dir):
|
|||||||
with open(output_file) as fh:
|
with open(output_file) as fh:
|
||||||
output = fh.read()
|
output = fh.read()
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
|
result.success("Patch applied correctly")
|
||||||
if output:
|
if output:
|
||||||
print output
|
print output
|
||||||
else:
|
else:
|
||||||
@ -190,12 +191,16 @@ def git_apply(result, cmd, patch_file, strip, output_dir):
|
|||||||
|
|
||||||
def mvn_clean(result, output_dir):
|
def mvn_clean(result, output_dir):
|
||||||
rc = execute("mvn clean 1>%s/clean.txt 2>&1" % output_dir)
|
rc = execute("mvn clean 1>%s/clean.txt 2>&1" % output_dir)
|
||||||
if rc != 0:
|
if rc == 0:
|
||||||
|
result.success("Clean was successful")
|
||||||
|
else:
|
||||||
result.fatal("failed to clean project (exit code %d)" % (rc))
|
result.fatal("failed to clean project (exit code %d)" % (rc))
|
||||||
|
|
||||||
def mvn_install(result, output_dir):
|
def mvn_install(result, output_dir):
|
||||||
rc = execute("mvn install -DskipTests 1>%s/install.txt 2>&1" % output_dir)
|
rc = execute("mvn install -DskipTests 1>%s/install.txt 2>&1" % output_dir)
|
||||||
if rc != 0:
|
if rc == 0:
|
||||||
|
result.success("Patch compiled")
|
||||||
|
else:
|
||||||
result.fatal("failed to build with patch (exit code %d)" % (rc))
|
result.fatal("failed to build with patch (exit code %d)" % (rc))
|
||||||
|
|
||||||
def find_all_files(top):
|
def find_all_files(top):
|
||||||
@ -206,7 +211,7 @@ def find_all_files(top):
|
|||||||
def mvn_test(result, output_dir):
|
def mvn_test(result, output_dir):
|
||||||
rc = execute("mvn test 1>%s/test.txt 2>&1" % output_dir)
|
rc = execute("mvn test 1>%s/test.txt 2>&1" % output_dir)
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
result.success("all tests passed")
|
result.success("All tests passed")
|
||||||
else:
|
else:
|
||||||
result.error("mvn test exited %d" % (rc))
|
result.error("mvn test exited %d" % (rc))
|
||||||
failed_tests = []
|
failed_tests = []
|
||||||
@ -384,11 +389,11 @@ def post_jira_comment_and_exit():
|
|||||||
|
|
||||||
mvn_clean(result, output_dir)
|
mvn_clean(result, output_dir)
|
||||||
git_checkout(result, branch)
|
git_checkout(result, branch)
|
||||||
#git_apply(result, patch_cmd, patch_file, strip, output_dir)
|
git_apply(result, patch_cmd, patch_file, strip, output_dir)
|
||||||
#mvn_install(result, output_dir)
|
mvn_install(result, output_dir)
|
||||||
#if run_tests:
|
if run_tests:
|
||||||
# mvn_test(result, output_dir)
|
mvn_test(result, output_dir)
|
||||||
#else:
|
else:
|
||||||
# result.info("patch applied and built but tests did not execute")
|
result.info("patch applied and built but tests did not execute")
|
||||||
|
|
||||||
result.exit_handler()
|
result.exit_handler()
|
||||||
|
Loading…
Reference in New Issue
Block a user