[ 
https://issues.apache.org/jira/browse/HADOOP-11929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546315#comment-14546315
 ] 

Allen Wittenauer edited comment on HADOOP-11929 at 5/15/15 10:43 PM:
---------------------------------------------------------------------

Oh, because it's relatively easy to compare, here's what the new check_site 
test looks like.  The biggest change you'll notice is that what were formerly 
"global" tests are now module tests.  So instead of compiling the entire site, 
we only compile the modules that personality said we should do:

{code}
function check_site
{
  local -r mypwd=$(pwd)
  local results=0

  big_console_header "Determining if patched site still builds"

  verify_needed_test site

  if [[ $? == 0 ]]; then
    echo "This patch does not appear to need site checks."
    return 0
  fi

  start_clock
  
  personality patch site
  
  until [[ $i -eq ${#MODULE[@]} ]]; do
    pushd ${BASEDIR}/${MODULE[${i}]} >/dev/null
    echo_and_redirect "${PATCH_DIR}/patchSiteWarnings-${MODULE[${i}]}.txt" \
       "${MVN}" clean site site:stage -Dmaven.javadoc.skip=true 
${MODULEEXTRAPARAM[${i}]} -D${PROJECT_NAME}PatchProcess
    if [[ $? != 0 ]] ; then
      echo "Site compilation for ${MODULE[${i}]} is broken"
      add_jira_table -1 site "Site compilation for ${MODULE[${i}]} is broken."
      add_jira_footer site "@@BASE@@/patchSiteWarnings-${MODULE[${i}]}.txt"
      ((results = results + 1))
    fi
    popd >/dev/null
    ((i=i+1))
  done

  if [[ ${result} -eq 0 ]]; then
    return 1
  fi
  
  add_jira_table +1 site "Site still builds."
  return 0
}
{code}


was (Author: aw):
Oh, because it's relatively easy to compare, here's what the new check_site 
test looks like.  The biggest change you'll notice is that what were formerly 
"global" tests are now module tests.  So instead of compile the entire site, we 
only compile the modules that personality said we should do:

{code}
function check_site
{
  local -r mypwd=$(pwd)
  local results=0

  big_console_header "Determining if patched site still builds"

  verify_needed_test site

  if [[ $? == 0 ]]; then
    echo "This patch does not appear to need site checks."
    return 0
  fi

  start_clock
  
  personality patch site
  
  until [[ $i -eq ${#MODULE[@]} ]]; do
    pushd ${BASEDIR}/${MODULE[${i}]} >/dev/null
    echo_and_redirect "${PATCH_DIR}/patchSiteWarnings-${MODULE[${i}]}.txt" \
       "${MVN}" clean site site:stage -Dmaven.javadoc.skip=true 
${MODULEEXTRAPARAM[${i}]} -D${PROJECT_NAME}PatchProcess
    if [[ $? != 0 ]] ; then
      echo "Site compilation for ${MODULE[${i}]} is broken"
      add_jira_table -1 site "Site compilation for ${MODULE[${i}]} is broken."
      add_jira_footer site "@@BASE@@/patchSiteWarnings-${MODULE[${i}]}.txt"
      ((results = results + 1))
    fi
    popd >/dev/null
    ((i=i+1))
  done

  if [[ ${result} -eq 0 ]]; then
    return 1
  fi
  
  add_jira_table +1 site "Site still builds."
  return 0
}
{code}

> add test-patch plugin points for customizing build layout
> ---------------------------------------------------------
>
>                 Key: HADOOP-11929
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11929
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Sean Busbey
>            Assignee: Allen Wittenauer
>            Priority: Minor
>         Attachments: hadoop.sh
>
>
> nothing fancy, just somethign that doesn't have a top level pom.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to