You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2020/03/26 15:51:04 UTC

[hbase] branch branch-1 updated (61f9048 -> b1617df)

This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a change to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git.


    from 61f9048  HBASE-23957 [flakey test] client.TestMultiParallel fails to read hbase-site.xml (#1310) (#1344)
     new 759ad3a  HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh
     new b1617df  HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh ADDENDUM

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-support/adhoc_run_tests/adhoc_run_tests.sh | 27 ++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)


[hbase] 01/02: HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh

Posted by nd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 759ad3a8cb33820344c84660deb6ebf08113c8b8
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Wed Mar 25 11:56:10 2020 -0700

    HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh
    
    Signed-off-by: stack <st...@apache.org>
---
 dev-support/adhoc_run_tests/adhoc_run_tests.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/dev-support/adhoc_run_tests/adhoc_run_tests.sh b/dev-support/adhoc_run_tests/adhoc_run_tests.sh
index 1dedcb1..79a2c8f 100755
--- a/dev-support/adhoc_run_tests/adhoc_run_tests.sh
+++ b/dev-support/adhoc_run_tests/adhoc_run_tests.sh
@@ -21,11 +21,12 @@ function usage {
   echo "Usage: ${0} [options] TestSomeTestName [TestOtherTest...]"
   echo ""
   echo "    --repeat times                        number of times to repeat if successful"
-  echo "    --force-timeout seconds               Seconds to wait before killing a given test run."
+  echo "    --force-timeout seconds               Seconds to wait before killing a given test run"
   echo "    --maven-local-repo /path/to/use       Path for maven artifacts while building"
   echo "    --surefire-fork-count                 set the fork-count. only useful if multiple " \
       "tests running (default 0.5C)"
   echo "    --log-output /path/to/use             path to directory to hold attempt log"
+  echo "    --hadoop-profile profile              specify a value passed via -Dhadoop.profile"
   exit 1
 }
 # Get arguments
@@ -34,6 +35,7 @@ declare fork_count="0.5C"
 declare -i attempts=1
 declare maven_repo="${HOME}/.m2/repository"
 declare output="."
+declare hadoop_profile='2.0'
 while [ $# -gt 0 ]
 do
   case "$1" in
@@ -42,6 +44,7 @@ do
     --repeat) shift; attempts=$1; shift;;
     --log-output) shift; output=$1; shift;;
     --surefire-fork-count) shift; fork_count=$1; shift;;
+    --hadoop-profile) shift; hadoop_profile=$1; shift;;
     --) shift; break;;
     -*) usage ;;
     *)  break;;  # terminate while loop
@@ -94,9 +97,12 @@ done
 declare tests="${*}"
 for attempt in $(seq "${attempts}"); do
   echo "Attempt ${attempt}" >&2
-  echo_run_redirect "${output}/mvn_test.log" mvn --batch-mode -Dmaven.repo.local="${maven_repo}" \
+  echo_run_redirect "${output}/mvn_test.log" mvn --batch-mode \
+      -Dhadoop.profile="${hadoop_profile}" \
+      -Dmaven.repo.local="${maven_repo}" \
       -Dtest="${tests// /,}" \
       -Dsurefire.rerunFailingTestsCount=0 -Dsurefire.parallel.forcedTimeout="${force_timeout}" \
       -Dsurefire.shutdown=kill -DtrimStackTrace=false -am "${mvn_module_arg[@]}" \
-      -DforkCount="${fork_count}" package
+      -DforkCount="${fork_count}" \
+      test
 done


[hbase] 02/02: HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh ADDENDUM

Posted by nd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit b1617df69c097c28d464ac7dc843530b3aaf7386
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Wed Mar 25 17:19:15 2020 -0700

    HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh ADDENDUM
    
    * Correctly handle the hadoop2 profile.
    * Create the output directory if it doesn't exist
---
 dev-support/adhoc_run_tests/adhoc_run_tests.sh | 27 +++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/dev-support/adhoc_run_tests/adhoc_run_tests.sh b/dev-support/adhoc_run_tests/adhoc_run_tests.sh
index 79a2c8f..fad7fff 100755
--- a/dev-support/adhoc_run_tests/adhoc_run_tests.sh
+++ b/dev-support/adhoc_run_tests/adhoc_run_tests.sh
@@ -35,7 +35,7 @@ declare fork_count="0.5C"
 declare -i attempts=1
 declare maven_repo="${HOME}/.m2/repository"
 declare output="."
-declare hadoop_profile='2.0'
+declare hadoop_profile
 while [ $# -gt 0 ]
 do
   case "$1" in
@@ -84,25 +84,30 @@ for test in "${@}"; do
   for module in $(find_modules "${test}"); do
     if [[ ! "${modules[*]}" =~ ${module} ]]; then
       echo "adding module '${module}' to set."
-      modules+=(${module})
+      modules+=("${module}")
     fi
   done
 done
 
 declare -a mvn_module_arg
-
 for module in "${modules[@]}"; do
   mvn_module_arg+=(-pl "${module}")
 done
+
 declare tests="${*}"
+declare -a maven_args=('--batch-mode' "-Dmaven.repo.local=${maven_repo}" "-Dtest=${tests// /,}"
+  '-Dsurefire.rerunFailingTestsCount=0' "-Dsurefire.parallel.forcedTimeout=${force_timeout}"
+  '-Dsurefire.shutdown=kill' '-DtrimStackTrace=false' '-am' "${mvn_module_arg[@]}"
+  "-DforkCount=${fork_count}" test)
+if [[ -n "${hadoop_profile}" ]] ; then
+  maven_args+=("-Dhadoop.profile=${hadoop_profile}")
+fi
+
+if [[ ! -d "${output}" ]] ; then
+  mkdir -p "${output}"
+fi
+
 for attempt in $(seq "${attempts}"); do
   echo "Attempt ${attempt}" >&2
-  echo_run_redirect "${output}/mvn_test.log" mvn --batch-mode \
-      -Dhadoop.profile="${hadoop_profile}" \
-      -Dmaven.repo.local="${maven_repo}" \
-      -Dtest="${tests// /,}" \
-      -Dsurefire.rerunFailingTestsCount=0 -Dsurefire.parallel.forcedTimeout="${force_timeout}" \
-      -Dsurefire.shutdown=kill -DtrimStackTrace=false -am "${mvn_module_arg[@]}" \
-      -DforkCount="${fork_count}" \
-      test
+  echo_run_redirect "${output}/mvn_test.log" mvn "${maven_args[@]}"
 done