You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ab...@apache.org on 2014/12/04 09:29:06 UTC

sqoop git commit: SQOOP-1833: Sqoop2: Add elapsed time information to pre-commit hook

Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 c81386f98 -> a4e0bfa51


SQOOP-1833: Sqoop2: Add elapsed time information to pre-commit hook

(Jarek Jarcec Cecho via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/a4e0bfa5
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/a4e0bfa5
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/a4e0bfa5

Branch: refs/heads/sqoop2
Commit: a4e0bfa51da951f7ae9f365368c55159e7abd699
Parents: c81386f
Author: Abraham Elmahrek <ab...@elmahrek.com>
Authored: Thu Dec 4 00:28:15 2014 -0800
Committer: Abraham Elmahrek <ab...@elmahrek.com>
Committed: Thu Dec 4 00:28:15 2014 -0800

----------------------------------------------------------------------
 dev-support/test-patch.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/a4e0bfa5/dev-support/test-patch.py
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py
index 8191693..e84ec2a 100755
--- a/dev-support/test-patch.py
+++ b/dev-support/test-patch.py
@@ -25,6 +25,7 @@
 #
 import sys, os, re, urllib2, base64, subprocess, tempfile, shutil
 import json
+import datetime
 from optparse import OptionParser
 
 tmp_dir = None
@@ -85,8 +86,7 @@ def jira_get_defect(result, defect, username, password):
   return jira_request(result, url, username, password, None, {}).read()
 
 def jira_generate_comment(result, branch):
-  body = [ "Here are the results of testing the latest attachment" ]
-  body += [ "%s against branch %s." % (result.attachment, branch) ]
+  body =  [ "Testing file [%s|%s] against branch %s took %s." % (result.attachment.split('/')[-1] , result.attachment, branch, datetime.datetime.now() - result.start_time) ]
   body += [ "" ]
   if result._fatal:
     result._error = [ result._fatal ] + result._error
@@ -107,7 +107,7 @@ def jira_generate_comment(result, branch):
     body += [ "{color:green}SUCCESS:{color} %s" % (success.replace("\n", "\\n")) ]
   if "BUILD_URL" in os.environ:
     body += [ "" ]
-    body += [ "Console output: %sconsole" % (os.environ['BUILD_URL']) ]
+    body += [ "Console output is available [here|%sconsole]." % (os.environ['BUILD_URL']) ]
   body += [ "" ]
   body += [ "This message is automatically generated." ]
   return "\\n".join(body)
@@ -268,6 +268,7 @@ class Result(object):
     self._fatal = None
     self.exit_handler = None
     self.attachment = "Not Found"
+    self.start_time = datetime.datetime.now()
   def error(self, msg):
     self._error.append(msg)
   def info(self, msg):