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 1e8440cfca9029d37806b27fcb2f5aeb4658ef19 Author: Nigel Daley <ni...@apache.org> AuthorDate: Tue Jul 8 05:08:57 2008 +0000 HADOOP-3653. Fix test-patch target to properly account for Eclipse classpath jars. Contributed by Brice Arnould. git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@674720 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/bin/test-patch.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/bin/test-patch.sh b/src/test/bin/test-patch.sh index 66a25953..47af83cc 100755 --- a/src/test/bin/test-patch.sh +++ b/src/test/bin/test-patch.sh @@ -468,10 +468,16 @@ runCoreTests () { ############################################################################### ### Tests parts of contrib specific to the eclipse files runContribTestOnEclipseFiles () { - export ECLIPSE_DECLARED_JARS=$(sed -n 's@.*kind="lib".*path="\(.*jar\)".*@\1@p' < .eclipse.templates/.classpath |sort) - export PRESENT_JARS=$(find lib/ -name '*.jar' |sort) + 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 + if [[ ${HUDSON} == "true" ]]; then + DECLARED_JARS="${DECLARED_JARS} $(cd "${SUPPORT_DIR}"; find lib -name '*.jar')" + fi + DECLARED_JARS=$(sed 'y/ /\n/' <<< ${DECLARED_JARS} | sort) export ECLIPSE_DECLARED_SRC=$(sed -n 's@.*kind="src".*path="\(.*\)".*@\1@p' < .eclipse.templates/.classpath |sort) - if [ "${ECLIPSE_DECLARED_JARS}" != "${PRESENT_JARS}" ]; then + + if [ "${DECLARED_JARS}" != "${PRESENT_JARS}" ]; then echo "Some jars are not declared in the Eclipse project." return 1 fi