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.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #/bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
  16. cd $MYDIR
  17. $SVN update
  18. $ANT clean
  19. if [ "$1" = "--all" ]; then
  20. $ANT -k -buildfile $MYDIR/doreports.xml doallreports
  21. elif [ "$1" = "--findbugs" ]; then
  22. $ANT -k -buildfile $MYDIR/style_build.xml findbugs
  23. else
  24. $ANT -k -buildfile $MYDIR/doreports.xml domostreports
  25. fi
  26. # Run junit issue notifier
  27. if [ -e "$SCRIPTDIR/junit-failures.php" ]; then
  28. $SCRIPTDIR/junit-failures.php
  29. fi
  30. # Oblong junit announcement
  31. LINE=`cat junitreports/overview-summary.html | grep "%</td"`
  32. PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
  33. if [ "${PASSRATE}" = "" ]; then
  34. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
  35. else
  36. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
  37. fi