You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by co...@apache.org on 2010/08/30 03:31:56 UTC

svn commit: r990681 - in /hadoop/common/trunk: CHANGES.txt src/test/bin/test-patch.sh

Author: cos
Date: Mon Aug 30 01:31:56 2010
New Revision: 990681

URL: http://svn.apache.org/viewvc?rev=990681&view=rev
Log:
HADOOP-6786. test-patch needs to verify Herriot integrity. Contributed by Konstantin Boudnik

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/test/bin/test-patch.sh

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=990681&r1=990680&r2=990681&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Mon Aug 30 01:31:56 2010
@@ -1093,6 +1093,8 @@ Release 0.21.0 - Unreleased
     HADOOP-6821.  Document changes to memory monitoring.  (Hemanth Yamijala
     via tomwhite)
 
+    HADOOP-6786. test-patch needs to verify Herriot integrity (cos)
+
   OPTIMIZATIONS
 
     HADOOP-5595. NameNode does not need to run a replicator to choose a

Modified: hadoop/common/trunk/src/test/bin/test-patch.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/bin/test-patch.sh?rev=990681&r1=990680&r2=990681&view=diff
==============================================================================
--- hadoop/common/trunk/src/test/bin/test-patch.sh (original)
+++ hadoop/common/trunk/src/test/bin/test-patch.sh Mon Aug 30 01:31:56 2010
@@ -599,6 +599,36 @@ runContribTests () {
 }
 
 ###############################################################################
+### Run the inject-system-faults target
+checkInjectSystemFaults () {
+  echo ""
+  echo ""
+  echo "======================================================================"
+  echo "======================================================================"
+  echo "    Checking the integrity of system test framework code."
+  echo "======================================================================"
+  echo "======================================================================"
+  echo ""
+  echo ""
+  
+  ### Kill any rogue build processes from the last attempt
+  $PS auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null
+
+  echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME inject-system-faults"
+  $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME inject-system-faults
+  if [[ $? != 0 ]] ; then
+    JIRA_COMMENT="$JIRA_COMMENT
+
+    -1 system tests framework.  The patch failed system tests framework compile."
+    return 1
+  fi
+  JIRA_COMMENT="$JIRA_COMMENT
+
+    +1 system tests framework.  The patch passed system tests framework compile."
+  return 0
+}
+
+###############################################################################
 ### Submit a comment to the defect's Jira
 submitJiraComment () {
   local result=$1
@@ -718,6 +748,8 @@ if [[ $HUDSON == "true" ]] ; then
   runContribTests
   (( RESULT = RESULT + $? ))
 fi
+checkInjectSystemFaults
+(( RESULT = RESULT + $? ))
 JIRA_COMMENT_FOOTER="Test results: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/testReport/
 $JIRA_COMMENT_FOOTER"