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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. PHP=`which php`
  28. if [ -e "$SCRIPTDIR/junit-failures.php" -a "${PHP}" != "" ]; then
  29. $PHP -q $SCRIPTDIR/junit-failures.php
  30. fi
  31. # Oblong junit announcement
  32. LINE=`cat junitreports/overview-summary.html | grep "%</td"`
  33. PASSRATE=`expr "$LINE" : '.*<td>\(.*\)%</td>'`
  34. if [ "${PASSRATE}" = "" ]; then
  35. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit tests failed to run)"
  36. else
  37. /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete (Junit Pass Rate: ${PASSRATE}%)"
  38. fi