yetus-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay Yadava <ajayyad...@apache.org>
Subject [Query] Executing custom maven command in test-patch
Date Mon, 05 Sep 2016 09:13:41 GMT
Hello,

I am evaluating Yetus for configuring precommit checks on Apache Falcon. My
requirement is very simple, take a patch, apply it and run 'mvn clean
install -Ptest-patch'. We use this profile to run tests, checkstyle,
findbugs and rat checks. Also, we want tests to be run for all modules and
not just for modules with changes. I created a profile as below for
falcon(stripping doc/comments for conciseness):


personality_plugins "github, whitespace, author, javac"

function personality_globals
{
PATCH_BRANCH_DEFAULT=master
JIRA_ISSUE_RE='^FALCON-[0-9]+$'
BUILDTOOL=maven
GITHUB_REPO="apache/falcon"
}

function personality_modules
{
local repostatus=$1
local testtype=$2
yetus_debug "Personality: ${repostatus} ${testtype}"
clear_personality_queue
extra="-Ptest-patch"
personality_enqueue_module . ${extra}
}


This activates the profile, but it seems that on mvninstall the code at [1]
always disables tests, checkstyle etc. and I am not able to find a hook /
example to get the desired result. Is there a way to achieve the desired
result using builtin plugins or do I need to write a new plugin? Also, is
it possible to run mvninstall only after patch has been applied
('repostatus' == 'patch')?

Regards
Ajay Yadava

[1]
https://github.com/apache/yetus/blob/master/precommit/test-patch.d/maven.sh#L552

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message