start-queue-win.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. export WEBKIT_BUGZILLA_USERNAME=$1
  3. export WEBKIT_BUGZILLA_PASSWORD=$2
  4. export BOT_ID=$3
  5. function error_handler()
  6. {
  7. start_ews
  8. }
  9. function start_ews()
  10. {
  11. trap 'error_handler ${LINENO} $?' ERR
  12. while :
  13. do
  14. date
  15. echo "TASK: cleaning up old log files."
  16. cd ~/win-ews-logs
  17. rm -rf win-ews.old
  18. mv win-ews.log win-ews.old
  19. find ~/win-ews-logs -mtime +7 -exec rm -f {} \;
  20. echo "TASK: Starting up"
  21. cd ~/WebKit
  22. echo "TASK: Cleaning WebKitBuild"
  23. rm -rf WebKitBuild
  24. date
  25. echo "TASK: Cleaning up"
  26. svn cleanup
  27. date
  28. echo "TASK: svn revert -R *"
  29. svn revert -R *
  30. date
  31. echo "TASK: svn status"
  32. svn status | grep "?" | awk '{print $2}' | xargs rm -rf
  33. date
  34. echo "TASK: webkit-patch clean"
  35. ~/WebKit/Tools/Scripts/webkit-patch clean
  36. date
  37. echo "TASK: svn up --non-interactive"
  38. svn up --non-interactive
  39. date
  40. echo "TASK: kill orphaned tasks"
  41. taskkill.exe /f /im cl.exe
  42. echo "TASK: webkit-patch win-ews"
  43. ~/WebKit/Tools/Scripts/webkit-patch win-ews --bot-id=$BOT_ID --no-confirm --exit-after-iteration 10
  44. echo "TASK: kill old processes"
  45. ~/WebKit/Tools/BuildSlaveSupport/kill-old-processes
  46. done
  47. }
  48. start_ews