Repository: yetus Updated Branches: refs/heads/YETUS-83 b17912eef -> 1a9afeebe
YETUS-157. build tools should force compile if their control file is patched Signed-off-by: Allen Wittenauer <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/1a9afeeb Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/1a9afeeb Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/1a9afeeb Branch: refs/heads/YETUS-83 Commit: 1a9afeebe047c405df34a67dd637e92aeb3da016 Parents: b17912e Author: Allen Wittenauer <[email protected]> Authored: Mon Nov 2 14:45:19 2015 -0800 Committer: Allen Wittenauer <[email protected]> Committed: Mon Nov 2 14:47:14 2015 -0800 ---------------------------------------------------------------------- precommit/test-patch.d/ant.sh | 11 +++++++++++ precommit/test-patch.d/gradle.sh | 13 +++++++++++++ precommit/test-patch.d/maven.sh | 18 ++++++++++++++---- precommit/test-patch.sh | 2 +- 4 files changed, 39 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/1a9afeeb/precommit/test-patch.d/ant.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/ant.sh b/precommit/test-patch.d/ant.sh index 9d931a5..d521aad 100755 --- a/precommit/test-patch.d/ant.sh +++ b/precommit/test-patch.d/ant.sh @@ -61,6 +61,17 @@ function ant_initialize fi } +function ant_filefilter +{ + declare filename=$1 + + if [[ ${filename} =~ build\.xml$ + || ${filename} =~ ivy\.xml$ ]]; then + yetus_debug "tests/compile: ${filename}" + add_test compile + fi +} + function ant_buildfile { echo "build.xml" http://git-wip-us.apache.org/repos/asf/yetus/blob/1a9afeeb/precommit/test-patch.d/gradle.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh index 56da8d5..15f14d0 100755 --- a/precommit/test-patch.d/gradle.sh +++ b/precommit/test-patch.d/gradle.sh @@ -67,6 +67,19 @@ function gradle_initialize fi } +function gradle_filefilter +{ + declare filename=$1 + + if [[ ${filename} =~ build\.gradle$ + || ${filename} =~ gradlew$ + || ${filename} =~ gradle\.properties$ + || ${filename} =~ wrapper\.gradle$ ]]; then + yetus_debug "tests/compile: ${filename}" + add_test compile + fi +} + function gradle_buildfile { echo "gradlew" http://git-wip-us.apache.org/repos/asf/yetus/blob/1a9afeeb/precommit/test-patch.d/maven.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh index 019b64d..c3cf12a 100755 --- a/precommit/test-patch.d/maven.sh +++ b/precommit/test-patch.d/maven.sh @@ -151,6 +151,16 @@ function maven_precheck fi } +function maven_filefilter +{ + declare filename=$1 + + if [[ ${filename} =~ pom\.xml$ ]]; then + yetus_debug "tests/compile: ${filename}" + add_test compile + fi +} + function maven_buildfile { echo "pom.xml" @@ -167,10 +177,10 @@ function mvnsite_filefilter if [[ ${BUILDTOOL} = maven ]]; then if [[ ${filename} =~ src/site ]]; then - yetus_debug "tests/mvnsite: ${filename}" - add_test mvnsite - fi - fi + yetus_debug "tests/mvnsite: ${filename}" + add_test mvnsite + fi + fi } function maven_modules_worker http://git-wip-us.apache.org/repos/asf/yetus/blob/1a9afeeb/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index 6b398ad..fad543b 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -1323,7 +1323,7 @@ function determine_needed_tests yetus_debug "Determining needed tests for ${i}" personality_file_tests "${i}" - for plugin in ${TESTTYPES}; do + for plugin in ${TESTTYPES} ${BUILDTOOL}; do if declare -f ${plugin}_filefilter >/dev/null 2>&1; then "${plugin}_filefilter" "${i}" fi
