5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-17 01:11:07 +08:00

SQOOP-2429: Sqoop2: Precommit: Add parameter --run-integration-tests

(Jarek Jarcec Cecho via Gwen Shapira)
This commit is contained in:
Gwen Shapira 2015-07-27 14:04:53 -07:00
parent 227d3e87bb
commit e1a8f5ca35

View File

@ -350,6 +350,8 @@ def exit(self):
help="Test patch file", metavar="FILE") help="Test patch file", metavar="FILE")
parser.add_option("--run-tests", dest="run_tests", parser.add_option("--run-tests", dest="run_tests",
help="Run Tests", action="store_true") help="Run Tests", action="store_true")
parser.add_option("--run-integration-tests", dest="run_integration_tests",
help="Run Integration Tests", action="store_true")
parser.add_option("--username", dest="username", parser.add_option("--username", dest="username",
help="JIRA Username", metavar="USERNAME", default="flumeqa") help="JIRA Username", metavar="USERNAME", default="flumeqa")
parser.add_option("--output", dest="output_dir", parser.add_option("--output", dest="output_dir",
@ -382,6 +384,7 @@ def exit(self):
username = options.username username = options.username
password = options.password password = options.password
run_tests = options.run_tests run_tests = options.run_tests
run_integration_tests = options.run_integration_tests
post_results = options.post_results post_results = options.post_results
strip = options.strip strip = options.strip
patch_cmd = options.patch_cmd patch_cmd = options.patch_cmd
@ -470,10 +473,15 @@ def post_jira_comment_and_exit():
static_test(result, patch_file, output_dir) static_test(result, patch_file, output_dir)
mvn_rat(result, output_dir) mvn_rat(result, output_dir)
mvn_install(result, output_dir) mvn_install(result, output_dir)
# Unit tests are conditional
if run_tests: if run_tests:
mvn_test(result, output_dir) mvn_test(result, output_dir)
else:
result.info("Unit tests were skipped, please add --run-tests")
# Integration tests are conditional
if run_integration_tests:
mvn_integration(result, output_dir) mvn_integration(result, output_dir)
else: else:
result.info("patch applied and built but tests did not execute") result.info("Integration tests were skipped, please add --run-integration-tests")
result.exit_handler() result.exit_handler()