Changeset 86213 in webkit
- Timestamp:
- May 10, 2011 10:32:00 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r86210 r86213 1 2011-05-10 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 EWS bots should be robust against test-webkitpy hangs 6 https://bugs.webkit.org/show_bug.cgi?id=60579 7 8 Added a killAfterTimeout subroutine, which takes a child_pid 9 and timeout, and will setup a watchdog process to kill that child 10 after the timeout. killAfterTimeout will waitpid on the child. 11 12 * EWSTools/start-queue.sh: 13 1 14 2011-05-10 MORITA Hajime <morrita@google.com> 2 15 -
trunk/Tools/EWSTools/start-queue.sh
r74301 r86213 1 1 #!/bin/sh 2 # Copyright (c) 2010 Google Inc. All rights reserved.2 # Copyright (c) 2010, 2011 Google Inc. All rights reserved. 3 3 # 4 4 # Redistribution and use in source and binary forms, with or without … … 28 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 30 killAfterTimeout() { 31 TARGET_PID=$1 32 TIMEOUT=$2 33 sleep $TIMEOUT && kill -9 $TARGET_PID & 34 WATCHDOG_PID=$! 35 wait $TARGET_PID 36 # FIXME: This kill will fail (and log) when the watchdog has exited (by killing the child process). 37 # There is likely magic shell commands to make it not log (redirecting stderr/stdout didn't work). 38 kill -9 $WATCHDOG_PID 39 } 40 30 41 if [[ $# -ne 2 ]];then 31 42 echo "Usage: start-queue.sh QUEUE_NAME BOT_ID" … … 40 51 fi 41 52 42 cd /mnt/git/webkit-$1 53 QUEUE_NAME=$1 54 BOT_ID=$2 55 56 cd /mnt/git/webkit-$QUEUE_NAME 43 57 while : 44 58 do 45 git reset --hard trunk 46 git clean -f 47 git rebase --abort 59 git reset --hard trunk # Throw away any patches in our tree. 60 git clean --force # Remove any left-over layout test results, added files, etc. 61 git rebase --abort # If we got killed during a git rebase, we need to clean up. 62 63 # Fetch before we rebase to speed up the rebase (fetching from git.webkit.org is way faster than pulling from svn.webkit.org) 48 64 git fetch 49 65 git svn rebase 66 50 67 # test-webkitpy has code to remove orphaned .pyc files, so we 51 68 # run it before running webkit-patch to avoid stale .pyc files 52 69 # preventing webkit-patch from launching. 53 ./Tools/Scripts/test-webkitpy 54 ./Tools/Scripts/webkit-patch $1 --bot-id=$2 --no-confirm --exit-after-iteration 10 70 ./Tools/Scripts/test-webkitpy & 71 killAfterTimeout $! $[60*10] # Wait up to 10 minutes for it to run (should take < 30 seconds). 72 73 # We use --exit-after-iteration to pick up any changes to webkit-patch, including 74 # changes to the committers.py file. 75 # test-webkitpy has been known to hang in the past, so run it using killAfterTimeout 76 # See https://bugs.webkit.org/show_bug.cgi?id=57724. 77 ./Tools/Scripts/webkit-patch $QUEUE_NAME --bot-id=$BOT_ID --no-confirm --exit-after-iteration 10 & 78 killAfterTimeout $! $[60*60*12] # Wait up to 12 hours. 55 79 done
Note: See TracChangeset
for help on using the changeset viewer.