Repository: sqoop Updated Branches: refs/heads/sqoop2 e908d1597 -> 30b3e4709
SQOOP-2458: Sqoop2: Precommit: Stop copying test results directly inside the pre-commit hook (Jarek Jarcec Cecho via Richard Zhou) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/30b3e470 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/30b3e470 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/30b3e470 Branch: refs/heads/sqoop2 Commit: 30b3e47098356250bcc7f5ffd72bb4dc6842e059 Parents: e908d15 Author: Richard Zhou <[email protected]> Authored: Wed Aug 5 10:08:02 2015 +0800 Committer: Richard Zhou <[email protected]> Committed: Wed Aug 5 10:08:02 2015 +0800 ---------------------------------------------------------------------- dev-support/test-patch.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/30b3e470/dev-support/test-patch.py ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py index 548faad..812463a 100755 --- a/dev-support/test-patch.py +++ b/dev-support/test-patch.py @@ -269,7 +269,6 @@ def run_mvn_test(command, test_type, result, output_dir): command += " -Pprecommit" # We need special test profile for precommit hook test_file_name = "test_%s.txt" % (test_type) test_output = "%s/%s" % (output_dir, test_file_name) - test_results_dir = "test-results" # Execute the test run rc = execute("mvn %s 1>%s 2>&1" % (command, test_output)) @@ -288,14 +287,10 @@ def run_mvn_test(command, test_type, result, output_dir): if rc == 0: result.success("All %s tests passed (executed %d tests)" % (test_type ,executed_tests) ) else: - archive_dir = os.path.join(output_dir, test_results_dir, test_type) - if not os.path.exists(archive_dir): - os.makedirs(archive_dir) failed_tests = [] for path in list(find_all_files(".")): file_name = os.path.basename(path) - if file_name.startswith("TEST-") and file_name.endswith(".xml") and test_results_dir not in path: - shutil.copy(path, archive_dir) + if file_name.startswith("TEST-") and file_name.endswith(".xml"): fd = open(path) for line in fd: if "<failure" in line or "<error" in line:
