# HG changeset patch # User Rob Landley # Date 1243755382 18000 # Node ID 46c4978c9a5c4a7b6c760230a2cdc2c8b0f274f6 # Parent 1b6acc6cf349c3b7bb2e53b4d0959b2659962c2f Add a 60 second timeout to smoketest. (Some qemu failure modes involve hanging.) diff -r 1b6acc6cf349 -r 46c4978c9a5c smoketest.sh --- a/smoketest.sh Sun May 31 02:35:41 2009 -0500 +++ b/smoketest.sh Sun May 31 02:36:22 2009 -0500 @@ -3,6 +3,19 @@ # This script compiles stuff under the final system, using distcc to call out # to the cross compiler. +# Set up a timeout. If it doesn't complete in 60 seconds, it failed. + +timeout() +{ + sleep 60 + kill $1 +} + +timeout $$ & +trap "kill $(jobs -p) 2>/dev/null" EXIT + +# Call run-from-build with a here document to do stuff. + # Note that the first line of the script is a few spaces followed by a comment # character. This gives some harmless data for the linux boot process to # consume and discard before it gets to the command prompt. I don't know why