You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aw...@apache.org on 2015/06/30 22:07:39 UTC

hadoop git commit: HADOOP-11914. test-patch.sh confused by certain patch formats (Kengo Seki via aw)

Repository: hadoop
Updated Branches:
  refs/heads/HADOOP-12111 1c5ae8a84 -> b4c7aa112


HADOOP-11914. test-patch.sh confused by certain patch formats (Kengo Seki via aw)


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

Branch: refs/heads/HADOOP-12111
Commit: b4c7aa1126094d48be4e57da710f18b13c5c3fc1
Parents: 1c5ae8a
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Jun 30 13:07:30 2015 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Tue Jun 30 13:07:30 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b4c7aa11/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index b958abf..f93cb4a 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -1060,16 +1060,11 @@ function find_changed_files
 {
   # get a list of all of the files that have been changed,
   # except for /dev/null (which would be present for new files).
-  # Additionally, remove any a/ b/ patterns at the front
-  # of the patch filenames and any revision info at the end
+  # Additionally, remove any a/ b/ patterns at the front of the patch filenames.
   # shellcheck disable=SC2016
-  CHANGED_FILES=$(${GREP} -E '^(\+\+\+|---) ' "${PATCH_DIR}/patch" \
-    | ${SED} \
-      -e 's,^....,,' \
-      -e 's,^[ab]/,,' \
-    | ${GREP} -v /dev/null \
-    | ${AWK} '{print $1}' \
-    | sort -u)
+  CHANGED_FILES=$(${AWK} 'function p(s){sub("^[ab]/","",s); if(s!~"^/dev/null"){print s}}
+    /^diff --git /   { p($3); p($4) }
+    /^(\+\+\+|---) / { p($2) }' "${PATCH_DIR}/patch" | sort -u)
 }
 
 ## @description  Find the modules of the build that ${PATCH_DIR}/patch modifies
@@ -1453,7 +1448,7 @@ function determine_needed_tests
   local i
 
   for i in ${CHANGED_FILES}; do
-
+    yetus_debug "Determining needed tests for ${i}"
     personality_file_tests "${i}"
 
     for plugin in ${PLUGINS}; do