You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/04/12 23:19:17 UTC
[43/50] incubator-impala git commit: Add -release switch to
buildall.sh help, change coverage options.
Add -release switch to buildall.sh help, change coverage options.
This change documents the -release switch. It also removes the _debug
and _release suffixes from -codecoverage_* and determines them from
the presence of -release. On top of that it adds sanity checks to the
specified options.
Change-Id: Id69791264cb2d9e0ffe96a7ac5aabc34a553a7be
Reviewed-on: http://gerrit.cloudera.org:8080/2043
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Internal Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/a65ffda5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/a65ffda5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/a65ffda5
Branch: refs/heads/master
Commit: a65ffda542e6efd8f44cb116912260f056d6f141
Parents: 49f9559
Author: Lars Volker <lv...@cloudera.com>
Authored: Thu Feb 4 11:17:09 2016 -0800
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Tue Apr 12 14:03:44 2016 -0700
----------------------------------------------------------------------
buildall.sh | 46 +++++++++++++++++++++++++++++++++-------------
1 file changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a65ffda5/buildall.sh
----------------------------------------------------------------------
diff --git a/buildall.sh b/buildall.sh
index 862e629..eeb8927 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -46,11 +46,13 @@ IMPALA_KERBERIZE=0
SNAPSHOT_FILE=
METASTORE_SNAPSHOT_FILE=
MAKE_IMPALA_ARGS=""
+BUILD_COVERAGE=0
+BUILD_ASAN=0
# Defaults that can be picked up from the environment, but are overridable through the
# commandline.
: ${EXPLORATION_STRATEGY:=core}
-: ${TARGET_BUILD_TYPE:=Debug}
+: ${CMAKE_BUILD_TYPE:=Debug}
# parse command line options
# TODO: We have to change this to use getopts, or something more sensible.
@@ -89,17 +91,14 @@ do
-format_sentry_policy_db)
FORMAT_SENTRY_POLICY_DB=1
;;
- -codecoverage_debug)
- TARGET_BUILD_TYPE=CODE_COVERAGE_DEBUG
+ -release)
+ CMAKE_BUILD_TYPE=Release
;;
- -codecoverage_release)
- TARGET_BUILD_TYPE=CODE_COVERAGE_RELEASE
+ -codecoverage)
+ BUILD_COVERAGE=1
;;
-asan)
- TARGET_BUILD_TYPE=ADDRESS_SANITIZER
- ;;
- -release)
- TARGET_BUILD_TYPE=Release
+ BUILD_ASAN=1
;;
-testpairwise)
EXPLORATION_STRATEGY=pairwise
@@ -149,9 +148,9 @@ do
echo "[-format_cluster] : Format the minicluster [Default: False]"
echo "[-format_metastore] : Format the metastore db [Default: False]"
echo "[-format_sentry_policy_db] : Format the Sentry policy db [Default: False]"
- echo "[-codecoverage_release] : Release code coverage build"
- echo "[-codecoverage_debug] : Debug code coverage build"
- echo "[-asan] : Build with address sanitizer"
+ echo "[-release] : Release build [Default: debug]"
+ echo "[-codecoverage] : Build with code coverage [Default: False]"
+ echo "[-asan] : Address sanitizer build [Default: False]"
echo "[-skiptests] : Skips execution of all tests"
echo "[-notests] : Skips building and execution of all tests"
echo "[-testpairwise] : Sun tests in 'pairwise' mode (increases"\
@@ -195,6 +194,27 @@ Examples of common tasks:
shift;
done
+# Adjust CMAKE_BUILD_TYPE for ASAN and code coverage, if necessary.
+if [[ ${BUILD_COVERAGE} -eq 1 ]]; then
+ case ${CMAKE_BUILD_TYPE} in
+ Debug)
+ CMAKE_BUILD_TYPE=CODE_COVERAGE_DEBUG
+ ;;
+ Release)
+ CMAKE_BUILD_TYPE=CODE_COVERAGE_RELEASE
+ ;;
+ esac
+fi
+if [[ ${BUILD_ASAN} -eq 1 ]]; then
+ # The next check also catches cases where BUILD_COVERAGE=1, which is not supported
+ # together with BUILD_ASAN=1.
+ if [[ "${CMAKE_BUILD_TYPE}" != "Debug" ]]; then
+ echo "Address sanitizer build not supported for build type: ${CMAKE_BUILD_TYPE}"
+ exit 1
+ fi
+ CMAKE_BUILD_TYPE=ADDRESS_SANITIZER
+fi
+
# If we aren't kerberized then we certainly don't need to talk about
# re-sourcing impala-config.
if [ ${IMPALA_KERBERIZE} -eq 0 ]; then
@@ -264,7 +284,7 @@ if [ $METASTORE_SNAPSHOT_FILE ]; then
fi
# build common and backend
-MAKE_IMPALA_ARGS="${MAKE_IMPALA_ARGS} -build_type=${TARGET_BUILD_TYPE}"
+MAKE_IMPALA_ARGS="${MAKE_IMPALA_ARGS} -build_type=${CMAKE_BUILD_TYPE}"
echo "Calling make_impala.sh ${MAKE_IMPALA_ARGS}"
$IMPALA_HOME/bin/make_impala.sh ${MAKE_IMPALA_ARGS}