Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 c3900910f -> 546f86152


SQOOP-1857: Sqoop2: Add rat check 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/546f8615
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/546f8615
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/546f8615

Branch: refs/heads/sqoop2
Commit: 546f8615273087985fc3e3d2eb03347abaed33b0
Parents: c390091
Author: Abraham Elmahrek <[email protected]>
Authored: Thu Dec 11 22:45:07 2014 -0600
Committer: Abraham Elmahrek <[email protected]>
Committed: Thu Dec 11 22:45:07 2014 -0600

----------------------------------------------------------------------
 dev-support/test-patch.py | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/546f8615/dev-support/test-patch.py
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.py b/dev-support/test-patch.py
index a98dce4..4aa9af1 100755
--- a/dev-support/test-patch.py
+++ b/dev-support/test-patch.py
@@ -214,6 +214,13 @@ def mvn_clean(result, output_dir):
   else:
     result.fatal("failed to clean project (exit code %d)" % (rc))
 
+def mvn_rat(result, output_dir):
+  rc = execute("mvn apache-rat:check 1>%s/rat.txt 2>&1" % output_dir)
+  if rc == 0:
+    result.success("License check passed")
+  else:
+    result.fatal("Failed to run license check (exit code %d)" % (rc))
+
 def mvn_install(result, output_dir):
   rc = execute("mvn install -DskipTests 1>%s/install.txt 2>&1" % output_dir)
   if rc == 0:
@@ -417,6 +424,7 @@ mvn_clean(result, output_dir)
 git_checkout(result, branch)
 git_apply(result, patch_cmd, patch_file, strip, output_dir)
 static_test(result, patch_file, output_dir)
+mvn_rat(result, output_dir)
 mvn_install(result, output_dir)
 if run_tests:
   mvn_test(result, output_dir)

Reply via email to