Repository: yetus Updated Branches: refs/heads/master 57bd97b33 -> ad5561ac9
YETUS-78. add support for orc Signed-off-by: Kengo Seki <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/ad5561ac Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/ad5561ac Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/ad5561ac Branch: refs/heads/master Commit: ad5561ac9e3925d091579036309b69289a0b29be Parents: 57bd97b Author: Allen Wittenauer <[email protected]> Authored: Thu Oct 15 10:26:53 2015 -0700 Committer: Kengo Seki <[email protected]> Committed: Mon Feb 1 13:01:04 2016 +0900 ---------------------------------------------------------------------- precommit/personality/orc.sh | 33 +++++++++++++++++++++++ precommit/test-patch.d/cmake.sh | 39 +++++++++++++-------------- precommit/test-patch.sh | 51 ++++++++++++++++-------------------- 3 files changed, 76 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/ad5561ac/precommit/personality/orc.sh ---------------------------------------------------------------------- diff --git a/precommit/personality/orc.sh b/precommit/personality/orc.sh new file mode 100755 index 0000000..b4fda31 --- /dev/null +++ b/precommit/personality/orc.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +personality_plugins "all,-checkstyle,-findbugs" + +function personality_globals +{ + #shellcheck disable=SC2034 + PATCH_BRANCH_DEFAULT=master + #shellcheck disable=SC2034 + JIRA_ISSUE_RE='^ORC-[0-9]+$' + # shellcheck disable=SC2034 + BUILDTOOL=cmake + #shellcheck disable=SC2034 + GITHUB_REPO="apache/orc" + + # protobuf fails + #shellcheck disable=SC2034 + CMAKE_ROOT_BUILD=true +} http://git-wip-us.apache.org/repos/asf/yetus/blob/ad5561ac/precommit/test-patch.d/cmake.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/cmake.sh b/precommit/test-patch.d/cmake.sh index 9608a1d..2eabd1e 100755 --- a/precommit/test-patch.d/cmake.sh +++ b/precommit/test-patch.d/cmake.sh @@ -64,6 +64,26 @@ function cmake_initialize yetus_error "ERROR: cmake requires make to be enabled." return 1 fi + +} + +## @description cmake module manipulation +## @audience private +## @stability evolving +## @replaceable no +function cmake_reorder_modules +{ + if [[ "${CMAKE_ROOT_BUILD}" = true ]]; then + #shellcheck disable=SC2034 + BUILDTOOLCWD="@@@BASEDIR@@@/${CMAKE_BUILD_DIR}" + #shellcheck disable=SC2034 + CHANGED_MODULES="." + #shellcheck disable=SC2034 + CHANGED_UNION_MODULES="." + else + #shellcheck disable=SC2034 + BUILDTOOLCWD="@@@MODULEDIR@@@/${CMAKE_BUILD_DIR}" + fi } ## @description get the name of the cmake build filename @@ -136,25 +156,6 @@ function cmake_modules_worker make_modules_worker "$@" } -## @description cmake module manipulator -## @audience private -## @stability evolving -## @replaceable no -function cmake_reorder_modules -{ - if [[ "${CMAKE_ROOT_BUILD}" = true ]]; then - #shellcheck disable=SC2034 - BUILDTOOLCWD="@@@BASEDIR@@@/${CMAKE_BUILD_DIR}" - #shellcheck disable=SC2034 - CHANGED_MODULES="." - #shellcheck disable=SC2034 - CHANGED_UNION_MODULES="." - else - #shellcheck disable=SC2034 - BUILDTOOLCWD="@@@MODULEDIR@@@/${CMAKE_BUILD_DIR}" - fi -} - ## @description cmake module queuer ## @audience private ## @stability evolving http://git-wip-us.apache.org/repos/asf/yetus/blob/ad5561ac/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index da91065..8fa7eee 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -1097,38 +1097,33 @@ function find_changed_modules # shellcheck disable=SC2034 CHANGED_UNION_MODULES=${CHANGED_MODULES} - # some build tools may want to change these and/or - # make other changes based upon these results - if declare -f "${BUILDTOOL}_changed_modules" >/dev/null; then - "${BUILDTOOL}_changed_modules" - fi - return - fi + else - i=1 - while [[ ${i} -lt 100 ]] - do - module=$(echo "${CHANGED_MODULES}" | tr ' ' '\n' | cut -f1-${i} -d/ | uniq) - count=$(echo "${module}" | wc -w) - if [[ ${count} -eq 1 - && -f ${module}/${buildfile} ]]; then - prev_builddir=${module} - elif [[ ${count} -gt 1 ]]; then - builddir=${prev_builddir} - break - fi - ((i=i+1)) - done + i=1 + while [[ ${i} -lt 100 ]] + do + module=$(echo "${CHANGED_MODULES}" | tr ' ' '\n' | cut -f1-${i} -d/ | uniq) + count=$(echo "${module}" | wc -w) + if [[ ${count} -eq 1 + && -f ${module}/${buildfile} ]]; then + prev_builddir=${module} + elif [[ ${count} -gt 1 ]]; then + builddir=${prev_builddir} + break + fi + ((i=i+1)) + done - if [[ -z ${builddir} ]]; then - builddir="." - fi + if [[ -z ${builddir} ]]; then + builddir="." + fi - yetus_debug "Finding union of ${builddir}" - builddir=$(find_buildfile_dir "${buildfile}" "${builddir}" || true) + yetus_debug "Finding union of ${builddir}" + builddir=$(find_buildfile_dir "${buildfile}" "${builddir}" || true) - #shellcheck disable=SC2034 - CHANGED_UNION_MODULES="${builddir}" + #shellcheck disable=SC2034 + CHANGED_UNION_MODULES="${builddir}" + fi # some build tools may want to change these and/or # make other changes based upon these results
