Merge "Issue #2254 - Send an email to omaha_awips on unit test failures or errors" into development

Former-commit-id: bc80d6f7dc [formerly ce4d54ee5a] [formerly f08d3f4a9d [formerly 22288cd9249420ffd643e5bb6d1f84bc6eda5326]]
Former-commit-id: f08d3f4a9d
Former-commit-id: d8812ab5f0
This commit is contained in:
Nate Jensen 2013-08-14 15:45:29 -05:00 committed by Gerrit Code Review
commit 01f2bcd45c
2 changed files with 31 additions and 5 deletions

View file

@ -34,7 +34,7 @@
<fileset dir="${AWIPS2_BASELINE}/cots/org.mockito" includes="**/*.jar" />
<fileset dir="${AWIPS2_BASELINE}/cots/org.springframework" includes="**/*.jar" />
<fileset dir="${AWIPS2_BASELINE}/cots/org.slf4j" includes="**/*.jar" />
<fileset dir="${AWIPS2_BASELINE}/cots" includes="**/*.jar" excludes="**/ant-*.jar" />
<fileset dir="${AWIPS2_BASELINE}/cots" includes="**/*.jar" excludes="**/ant-*.jar" />
<fileset dir="${PROJECTS.DIR}/cots" includes="**/*.jar" />
<dirset dir="${PROJECTS.DIR}" includes="**/bin" />
<fileset dir="${basedir}/lib" includes="**/*.jar" />
@ -58,13 +58,13 @@
</for>
<path id="test.compile.classpath">
<fileset dir="${UNZIP.DIR}" includes="**/*.jar" excludes="**/ant-*.jar" />
<fileset dir="${UNZIP.DIR}" includes="**/*.jar" excludes="**/ant-*.jar" />
<fileset dir="${PROJECTS.DIR}/org.hamcrest" includes="**/*.jar" />
<fileset dir="${PROJECTS.DIR}/org.mockito" includes="**/*.jar" />
<fileset dir="${PROJECTS.DIR}/org.springframework" includes="**/*.jar" />
<fileset dir="${PROJECTS.DIR}/org.slf4j" includes="**/*.jar" />
<fileset dir="${basedir}/lib" includes="**/*.jar" />
<fileset dir="${JUNIT}" includes="**/*.jar" />
<fileset dir="${basedir}/lib" includes="**/*.jar" />
<fileset dir="${JUNIT}" includes="**/*.jar" />
</path>
<!-- Include resource files provided by projects -->
@ -116,8 +116,15 @@
</batchtest>
</junit>
</forEachTestType>
<antcall target="send.email"/>
<!--<fail if="tests.failed" message="Received a FAILED status for one or more test results!" />-->
<junitreport todir="${TEST.REPORTS.DIR}">
<fileset dir="${TEST.REPORTS.DIR}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${TEST.REPORTS.DIR}/html"/>
</junitreport>
</target>
<macrodef name="forEachTestType" description="Loops over all requested test types, and performs the passed in action">
@ -131,4 +138,21 @@
</sequential>
</macrodef>
<target name="send.email" depends="mail.check" if="send.mail">
<mail mailhost="localhost" mailport="25" subject="Unit Test Failures">
<from address="jenkins@halfmaen.omaha.us.ray.com" />
<replyto address="steven_l_harris@raytheon.com" />
<to address="omaha_awips@raytheon.com" />
<message>Nightly build has unit test failures. http://awipscm/junit/</message>
</mail>
</target>
<target name="mail.check">
<condition property="send.mail">
<and>
<isset property="tests.failed" />
<isset property="jenkins.build" />
</and>
</condition>
</target>
</project>

View file

@ -12,3 +12,5 @@ fi
export ANT_OPTS="-XX:PermSize=${INITIAL_PERMGEN_SIZE} -XX:MaxPermSize=${MAX_PERMGEN_SIZE} $*"
ant
sudo rsync -rugl tmp/test-reports/html/* root@awipscm:/var/www/html/junit