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 ji...@apache.org on 2015/05/21 01:48:45 UTC
[21/50] [abbrv] hadoop git commit: HADOOP-11949. Add user-provided
plugins to test-patch (Sean Busbey via aw)
HADOOP-11949. Add user-provided plugins to test-patch (Sean Busbey via aw)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/060c84ea
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/060c84ea
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/060c84ea
Branch: refs/heads/HDFS-7240
Commit: 060c84ea86257e3dea2f834aac7ae27b1456c434
Parents: bcc1786
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon May 18 17:06:31 2015 +0000
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Mon May 18 17:06:31 2015 +0000
----------------------------------------------------------------------
dev-support/test-patch.sh | 27 +++++++++++++++++---
hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++
2 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/060c84ea/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index ae74c5b..57fd657 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -40,6 +40,9 @@ function setup_defaults
BASEDIR=$(pwd)
RELOCATE_PATCH_DIR=false
+ USER_PLUGIN_DIR=""
+ LOAD_SYSTEM_PLUGINS=true
+
FINDBUGS_HOME=${FINDBUGS_HOME:-}
ECLIPSE_HOME=${ECLIPSE_HOME:-}
BUILD_NATIVE=${BUILD_NATIVE:-true}
@@ -586,9 +589,11 @@ function hadoop_usage
echo "--modulelist=<list> Specify additional modules to test (comma delimited)"
echo "--offline Avoid connecting to the Internet"
echo "--patch-dir=<dir> The directory for working and output files (default '/tmp/${PROJECT_NAME}-test-patch/pid')"
+ echo "--plugins=<dir> A directory of user provided plugins. see test-patch.d for examples (default empty)"
echo "--project=<name> The short name for project currently using test-patch (default 'hadoop')"
echo "--resetrepo Forcibly clean the repo"
echo "--run-tests Run all relevant tests below the base directory"
+ echo "--skip-system-plugins Do not load plugins from ${BINDIR}/test-patch.d"
echo "--testlist=<list> Specify which subsystem tests to use (comma delimited)"
echo "Shell binary overrides:"
@@ -706,6 +711,9 @@ function parse_args
--patch-dir=*)
USER_PATCH_DIR=${i#*=}
;;
+ --plugins=*)
+ USER_PLUGIN_DIR=${i#*=}
+ ;;
--project=*)
PROJECT_NAME=${i#*=}
;;
@@ -723,6 +731,9 @@ function parse_args
--run-tests)
RUN_TESTS=true
;;
+ --skip-system-plugins)
+ LOAD_SYSTEM_PLUGINS=false
+ ;;
--testlist=*)
testlist=${i#*=}
testlist=${testlist//,/ }
@@ -2523,17 +2534,25 @@ function runtests
done
}
-## @description Import content from test-patch.d
+## @description Import content from test-patch.d and optionally
+## @description from user provided plugin directory
## @audience private
## @stability evolving
## @replaceable no
function importplugins
{
local i
- local files
+ local files=()
+
+ if [[ ${LOAD_SYSTEM_PLUGINS} == "true" ]]; then
+ if [[ -d "${BINDIR}/test-patch.d" ]]; then
+ files=(${BINDIR}/test-patch.d/*.sh)
+ fi
+ fi
- if [[ -d "${BINDIR}/test-patch.d" ]]; then
- files=(${BINDIR}/test-patch.d/*.sh)
+ if [[ -n "${USER_PLUGIN_DIR}" && -d "${USER_PLUGIN_DIR}" ]]; then
+ hadoop_debug "Loading user provided plugins from ${USER_PLUGIN_DIR}"
+ files=("${files[@]}" ${USER_PLUGIN_DIR}/*.sh)
fi
for i in "${files[@]}"; do
http://git-wip-us.apache.org/repos/asf/hadoop/blob/060c84ea/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 8f66072..324434b 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -486,6 +486,8 @@ Release 2.8.0 - UNRELEASED
HADOOP-11843. Make setting up the build environment easier.
(Niels Basjes via cnauroth)
+ HADOOP-11949. Add user-provided plugins to test-patch (Sean Busbey via aw)
+
IMPROVEMENTS
HADOOP-6842. "hadoop fs -text" does not give a useful text representation