Repository: yetus Updated Branches: refs/heads/YETUS-83 f57fd458a -> e8bd3ad1b
YETUS-142. compile gets limited to 'warning' in generic log handler (04 version) Signed-off-by: Chris Nauroth <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/e8bd3ad1 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/e8bd3ad1 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/e8bd3ad1 Branch: refs/heads/YETUS-83 Commit: e8bd3ad1b3190ef9caca923d5b18c51833adfd51 Parents: f57fd45 Author: Allen Wittenauer <[email protected]> Authored: Mon Nov 2 22:13:46 2015 -0800 Committer: Allen Wittenauer <[email protected]> Committed: Wed Nov 4 14:05:19 2015 -0800 ---------------------------------------------------------------------- precommit/test-patch.d/cc.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/e8bd3ad1/precommit/test-patch.d/cc.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/cc.sh b/precommit/test-patch.d/cc.sh index f411028..eb8ce4e 100755 --- a/precommit/test-patch.d/cc.sh +++ b/precommit/test-patch.d/cc.sh @@ -16,21 +16,20 @@ add_test_type cc +CC_EXT_RE='(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)' + function cc_filefilter { declare filename=$1 - if [[ ${filename} =~ \.c$ - || ${filename} =~ \.cc$ - || ${filename} =~ \.cpp$ - || ${filename} =~ \.cxx$ - || ${filename} =~ \.h$ - || ${filename} =~ \.hh$ - ]]; then - yetus_debug "tests/cc: ${filename}" - add_test cc - add_test compile + shopt -s nocasematch + if [[ ${filename} =~ \.${CC_EXT_RE}$ ]]; then + shopt -u nocasematch + yetus_debug "tests/cc: ${filename}" + add_test cc + add_test compile fi + shopt -u nocasematch } ## @description check for C/C++ compiler errors @@ -64,5 +63,5 @@ function cc_logfilter declare output=$2 #shellcheck disable=SC2016,SC2046 - ${GREP} -E '^.*\.(c|cc|h|hh|.cxx|.cpp)\:[[:digit:]]*\:' "${input}" > "${output}" + ${GREP} -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" > "${output}" }
