This is an automated email from the ASF dual-hosted git repository. aw pushed a commit to tag prehistory in repository https://gitbox.apache.org/repos/asf/yetus.git
commit bc86ebbecd5b98af7401682336debdc0019056db Author: Tsz-wo Sze <szets...@apache.org> AuthorDate: Wed Sep 24 20:38:08 2008 +0000 HADOOP-4244. Change test-patch.sh to check Eclipse classpath no matter it is run by Hudson or not. (szetszwo) git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@698721 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/bin/test-patch.sh | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/test/bin/test-patch.sh b/src/test/bin/test-patch.sh index 4da15267..32c4df7e 100755 --- a/src/test/bin/test-patch.sh +++ b/src/test/bin/test-patch.sh @@ -491,7 +491,7 @@ runCoreTests () { ############################################################################### ### Tests parts of contrib specific to the eclipse files -runContribTestOnEclipseFiles () { +checkJarFilesDeclaredInEclipse () { export DECLARED_JARS=$(sed -n 's@.*kind="lib".*path="\(.*jar\)".*@\1@p' < .eclipse.templates/.classpath) export PRESENT_JARS=$(find lib/ src/test/lib/ -name '*.jar' |sort) # When run by Hudson, consider libs from ${SUPPORT_DIR} declared @@ -515,6 +515,29 @@ FAILED: $dir is referenced in the Eclipse project although it doesn't exists any return 0 } +checkEclipse () { + echo "" + echo "" + echo "======================================================================" + echo "======================================================================" + echo " Running Eclipse classpath verification." + echo "======================================================================" + echo "======================================================================" + echo "" + echo "" + + checkJarFilesDeclaredInEclipse + if [[ $? != 0 ]] ; then + JIRA_COMMENT="$JIRA_COMMENT + + -1 Eclipse classpath. The patch causes the Eclipse classpath to differ from the contents of the lib directories." + return 1 + fi + JIRA_COMMENT="$JIRA_COMMENT + + +1 Eclipse classpath. The patch retains Eclipse classpath integrity." + return 0 +} ############################################################################### ### Run the test-contrib target runContribTests () { @@ -531,8 +554,8 @@ runContribTests () { ### 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}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib && runContribTestOnEclipseFiles" - $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib && runContribTestOnEclipseFiles + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib" + $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib if [[ $? != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT @@ -650,6 +673,8 @@ checkStyle (( RESULT = RESULT + $? )) checkFindbugsWarnings (( RESULT = RESULT + $? )) +checkEclipse +(( RESULT = RESULT + $? )) ### Do not call these when run by a developer if [[ $HUDSON == "true" ]] ; then ### DISABLE RELEASE AUDIT UNTIL HADOOP-4074 IS FIXED