You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DoReports.sh 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. # cron doesn't do this
  3. . /etc/profile
  4. . ${HOME}/.bashrc
  5. # Used for the report.log to help diagnosing problems
  6. env
  7. # Path to trunk
  8. MYDIR="/home/dmdirc/google"
  9. # Path to scripts
  10. SCRIPTDIR="/home/dmdirc/scripts"
  11. # Path to ant binary
  12. ANT="/usr/bin/ant"
  13. # Path to svn binary
  14. SVN="/usr/bin/svn"
  15. # Increase the memory allowed to be used when running stuff
  16. export ANT_OPTS=-Xmx512m
  17. #/bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
  18. cd $MYDIR
  19. $SVN update
  20. $ANT clean
  21. # Anti-Clover stupidness!
  22. rm -Rf ${MYDIR}/.clover
  23. mkdir ${MYDIR}/.clover
  24. if [ "$1" = "--all" ]; then
  25. $ANT -k -buildfile $MYDIR/doreports.xml doallreports
  26. elif [ "$1" = "--findbugs" ]; then
  27. $ANT -k -buildfile $MYDIR/style_build.xml findbugs
  28. else
  29. $ANT -k -buildfile $MYDIR/doreports.xml domostreports
  30. fi
  31. # Run junit issue notifier
  32. PHP=`which php`
  33. if [ -e "$SCRIPTDIR/junit-failures.php" -a "${PHP}" != "" ]; then
  34. $PHP -q $SCRIPTDIR/junit-failures.php
  35. fi
  36. # Oblong junit announcement
  37. LINE=`cat junitreports/overview-summary.html | grep "%</td"`
  38. PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
  39. if [ "${PASSRATE}" = "" ]; then
  40. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
  41. else
  42. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
  43. fi