[1/2] sentry git commit: Revert SENTRY-2056: Display test-patch.py output on the standard console to see progress on Jenkins. (Kalyan Kumar kalvagadda, reviewed-by Sergio Pena)
Repository: sentry Updated Branches: refs/heads/master 25f025f3c -> 035333a4d Revert SENTRY-2056: Display test-patch.py output on the standard console to see progress on Jenkins. (Kalyan Kumar kalvagadda, reviewed-by Sergio Pena) Reverting the change as there was issue while running tests. Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/64292b85 Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/64292b85 Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/64292b85 Branch: refs/heads/master Commit: 64292b85094db8d9dbbaf9113e7c777d2233f920 Parents: 25f025f Author: Kalyan Kumar Kalvagadda Authored: Wed Jun 13 10:09:10 2018 -0500 Committer: Kalyan Kumar Kalvagadda Committed: Wed Jun 13 10:09:10 2018 -0500 -- dev-support/test-patch.py | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/sentry/blob/64292b85/dev-support/test-patch.py -- diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py index 3cae008..69d8711 100644 --- a/dev-support/test-patch.py +++ b/dev-support/test-patch.py @@ -23,17 +23,10 @@ from optparse import OptionParser tmp_dir = None BASE_JIRA_URL = 'https://issues.apache.org/jira' -def execute(cmd, log=True, output_file=""): - processes = list() +def execute(cmd, log=True): if log: print "INFO: Executing %s" % (cmd) - if len(output_file) > 0 : -processes.append(subprocess.Popen(cmd, shell=True)) -processes.append(subprocess.Popen('tail -f ' + output_file, shell=True)) -if processes[0].poll() is None: - return processes[0].wait() - else: -return subprocess.call(cmd, shell=True) + return subprocess.call(cmd, shell=True) def jira_request(result, url, username, password, data, headers): request = urllib2.Request(url, data, headers) @@ -127,7 +120,7 @@ def git_checkout(result, branch): def git_apply(result, cmd, patch_file, output_dir): output_file = "%s/apply.txt" % (output_dir) - rc = execute("%s %s 1>%s 2>&1" % (cmd, patch_file, output_file), True, output_file) + rc = execute("%s %s 1>%s 2>&1" % (cmd, patch_file, output_file)) output = "" if os.path.exists(output_file): with open(output_file) as fh: @@ -138,14 +131,12 @@ def git_apply(result, cmd, patch_file, output_dir): result.fatal("failed to apply patch (exit code %d):\n%s\n" % (rc, output)) def mvn_clean(result, mvn_repo, output_dir, mvn_profile): - output_file = output_dir+'/clean.txt' - rc = execute("mvn clean -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), True, output_file) + rc = execute("mvn clean -Dmaven.repo.local=%s %s 1>%s/clean.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc != 0: result.fatal("failed to clean project (exit code %d)" % (rc)) def mvn_install(result, mvn_repo, output_dir, mvn_profile): - output_file = output_dir+'/install.txt' - rc = execute("mvn install -U -DskipTests -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), True, output_file) + rc = execute("mvn install -U -DskipTests -Dmaven.repo.local=%s %s 1>%s/install.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc != 0: result.fatal("failed to build with patch (exit code %d)" % (rc)) @@ -155,7 +146,7 @@ def find_all_files(top): yield os.path.join(root, f) def mvn_test(result, mvn_repo, output_dir, mvn_profile): - rc = execute("mvn verify --fail-at-end -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), True, output_file) + rc = execute("mvn verify --fail-at-end -Dmaven.repo.local=%s %s 1>%s/test.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc == 0: result.success("all tests passed") else:
sentry git commit: Revert SENTRY-2056: Display test-patch.py output on the standard console to see progress on Jenkins. (Kalyan Kumar kalvagadda, reviewed-by Sergio Pena)
Repository: sentry Updated Branches: refs/heads/master 283fe7c5a -> d41696d6a Revert SENTRY-2056: Display test-patch.py output on the standard console to see progress on Jenkins. (Kalyan Kumar kalvagadda, reviewed-by Sergio Pena) Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/d41696d6 Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/d41696d6 Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/d41696d6 Branch: refs/heads/master Commit: d41696d6ae32dec16767d15d0d8d31b9e34f38fd Parents: 283fe7c Author: Kalyan Kumar Kalvagadda Authored: Tue Jun 12 15:49:50 2018 -0500 Committer: Kalyan Kumar Kalvagadda Committed: Tue Jun 12 15:49:50 2018 -0500 -- dev-support/test-patch.py | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/sentry/blob/d41696d6/dev-support/test-patch.py -- diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py index 05d4936..69d8711 100644 --- a/dev-support/test-patch.py +++ b/dev-support/test-patch.py @@ -23,17 +23,10 @@ from optparse import OptionParser tmp_dir = None BASE_JIRA_URL = 'https://issues.apache.org/jira' -def execute(cmd, output_file="", log=True): - processes = list() +def execute(cmd, log=True): if log: print "INFO: Executing %s" % (cmd) - if len(output_file) > 0 : -processes.append(subprocess.Popen(cmd, shell=True)) -processes.append(subprocess.Popen('tail -f ' + output_file, shell=True)) -if processes[0].poll() is None: - return processes[0].wait() - else: -return subprocess.call(cmd, shell=True) + return subprocess.call(cmd, shell=True) def jira_request(result, url, username, password, data, headers): request = urllib2.Request(url, data, headers) @@ -127,7 +120,7 @@ def git_checkout(result, branch): def git_apply(result, cmd, patch_file, output_dir): output_file = "%s/apply.txt" % (output_dir) - rc = execute("%s %s 1>%s 2>&1" % (cmd, patch_file, output_file), output_file) + rc = execute("%s %s 1>%s 2>&1" % (cmd, patch_file, output_file)) output = "" if os.path.exists(output_file): with open(output_file) as fh: @@ -138,14 +131,12 @@ def git_apply(result, cmd, patch_file, output_dir): result.fatal("failed to apply patch (exit code %d):\n%s\n" % (rc, output)) def mvn_clean(result, mvn_repo, output_dir, mvn_profile): - output_file = output_dir+'/clean.txt' - rc = execute("mvn clean -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), output_file) + rc = execute("mvn clean -Dmaven.repo.local=%s %s 1>%s/clean.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc != 0: result.fatal("failed to clean project (exit code %d)" % (rc)) def mvn_install(result, mvn_repo, output_dir, mvn_profile): - output_file = output_dir+'/install.txt' - rc = execute("mvn install -U -DskipTests -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), output_file) + rc = execute("mvn install -U -DskipTests -Dmaven.repo.local=%s %s 1>%s/install.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc != 0: result.fatal("failed to build with patch (exit code %d)" % (rc)) @@ -155,8 +146,7 @@ def find_all_files(top): yield os.path.join(root, f) def mvn_test(result, mvn_repo, output_dir, mvn_profile): - output_file = output_dir+'/test.txt' - rc = execute("mvn verify --fail-at-end -Dmaven.repo.local=%s %s 1>%s 2>&1" % (mvn_repo, mvn_profile, output_file), output_file) + rc = execute("mvn verify --fail-at-end -Dmaven.repo.local=%s %s 1>%s/test.txt 2>&1" % (mvn_repo, mvn_profile, output_dir)) if rc == 0: result.success("all tests passed") else: