From e5d01577e4e989b1023559aa6addd1b37252293e Mon Sep 17 00:00:00 2001 From: Apekshit Date: Thu, 21 Apr 2016 15:34:12 -0700 Subject: [PATCH] HBASE-15689 Changes in hbase-personality.sh to include/exclude tests run by maven. (Apekshit) Change-Id: I517e7a9ba3321cb19d1eeb1d46d62628213b8bbb --- dev-support/hbase-personality.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index d2e94e3f40c..67970906b43 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -92,8 +92,34 @@ function personality_modules return fi + # If EXCLUDE_TESTS_URL/INCLUDE_TESTS_URL is set, fetches the url + # and sets -Dtest.exclude.pattern/-Dtest to exclude/include the + # tests respectively. if [[ ${testtype} = unit ]]; then extra="${extra} -PrunAllTests" + if [[ -n "$EXCLUDE_TESTS_URL" ]]; then + wget "$EXCLUDE_TESTS_URL" -O "excludes" + if [[ $? -eq 0 ]]; then + excludes=$(cat excludes) + if [[ -n "${excludes}" ]]; then + extra="${extra} -Dtest.exclude.pattern=${excludes}" + fi + else + echo "Wget error $? in fetching excludes file from url" \ + "${EXCLUDE_TESTS_URL}. Ignoring and proceeding." + fi + elif [[ -n "$INCLUDE_TESTS_URL" ]]; then + wget "$INCLUDE_TESTS_URL" -O "includes" + if [[ $? -eq 0 ]]; then + includes=$(cat includes) + if [[ -n "${includes}" ]]; then + extra="${extra} -Dtest=${includes}" + fi + else + echo "Wget error $? in fetching includes file from url" \ + "${INCLUDE_TESTS_URL}. Ignoring and proceeding." + fi + fi # Inject the jenkins build-id for our surefire invocations # Used by zombie detection stuff, even though we're not including that yet.