You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ka...@apache.org on 2018/06/13 15:10:52 UTC

[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 <kk...@cloudera.com>
Authored: Wed Jun 13 10:09:10 2018 -0500
Committer: Kalyan Kumar Kalvagadda <kk...@cloudera.com>
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:


[2/2] sentry git commit: SENTRY-2056: Display test-patch.py output on the standard console to see progress on Jenkins. (Kalyan Kumar kalvagadda, reviewed-by Sergio Pena)

Posted by ka...@apache.org.
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/035333a4
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/035333a4
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/035333a4

Branch: refs/heads/master
Commit: 035333a4da12681d4a4406da101915b976a2cdc9
Parents: 64292b8
Author: Kalyan Kumar Kalvagadda <kk...@cloudera.com>
Authored: Wed Jun 13 10:10:26 2018 -0500
Committer: Kalyan Kumar Kalvagadda <kk...@cloudera.com>
Committed: Wed Jun 13 10:10:26 2018 -0500

----------------------------------------------------------------------
 dev-support/test-patch.py | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/035333a4/dev-support/test-patch.py
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py
index 69d8711..99241d4 100644
--- a/dev-support/test-patch.py
+++ b/dev-support/test-patch.py
@@ -23,10 +23,17 @@ from optparse import OptionParser
 tmp_dir = None
 BASE_JIRA_URL = 'https://issues.apache.org/jira'
 
-def execute(cmd, log=True):
+def execute(cmd, log=True, output_file=""):
+  processes = list()
   if log:
     print "INFO: Executing %s" % (cmd)
-  return subprocess.call(cmd, shell=True)
+  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)
 
 def jira_request(result, url, username, password, data, headers):
   request = urllib2.Request(url, data, headers)
@@ -120,7 +127,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))
+  rc = execute("%s %s 1>%s 2>&1" % (cmd, patch_file, output_file), True, output_file)
   output = ""
   if os.path.exists(output_file):
     with open(output_file) as fh:
@@ -131,12 +138,14 @@ 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):
-  rc = execute("mvn clean -Dmaven.repo.local=%s %s 1>%s/clean.txt 2>&1" % (mvn_repo, mvn_profile, output_dir))
+  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)
   if rc != 0:
     result.fatal("failed to clean project (exit code %d)" % (rc))
 
 def mvn_install(result, mvn_repo, output_dir, mvn_profile):
-  rc = execute("mvn install -U -DskipTests -Dmaven.repo.local=%s %s 1>%s/install.txt 2>&1" % (mvn_repo, mvn_profile, output_dir))
+  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)
   if rc != 0:
     result.fatal("failed to build with patch (exit code %d)" % (rc))
 
@@ -146,7 +155,8 @@ 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/test.txt 2>&1" % (mvn_repo, mvn_profile, output_dir))
+  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), True, output_file)
   if rc == 0:
     result.success("all tests passed")
   else: