comparison sources/more/native-build.sh @ 1003:6d3db5bf731a

Make the native build timeout configurable.
author Rob Landley <rob@landley.net>
date Thu, 18 Mar 2010 05:44:47 -0500
parents cfa6262528f3
children d62c5c8734b2
comparison
equal deleted inserted replaced
1002:a835d605cb85 1003:6d3db5bf731a
8 8
9 . sources/functions.sh || exit 1 9 . sources/functions.sh || exit 1
10 10
11 # Parse arguments 11 # Parse arguments
12 12
13 if [ $# -ne 3 ] 13 if [ $# -lt 3 ]
14 then 14 then
15 echo "usage: $0 ARCH HDCFILE OUTPUTDIR" >&2 15 echo "usage: $0 ARCH HDCFILE OUTPUTDIR [TIMEOUT_SECONDS]" >&2
16 exit 1 16 exit 1
17 fi 17 fi
18 18
19 ARCH="$1" 19 ARCH="$1"
20 if [ ! -f "$2" ] 20 if [ ! -f "$2" ]
23 exit 1 23 exit 1
24 fi 24 fi
25 HDCFILE="$(readlink -f $2)" 25 HDCFILE="$(readlink -f $2)"
26 mkdir -p "$3" || dienow 26 mkdir -p "$3" || dienow
27 STAGE_DIR="$(readlink -f $3)" 27 STAGE_DIR="$(readlink -f $3)"
28
29 [ ! -z "$4" ] && DO_TIMEOUT="sources/timeout.sh $4"
28 30
29 # Fire off the ftp daemon, making sure it's killed when this script exits 31 # Fire off the ftp daemon, making sure it's killed when this script exits
30 32
31 . sources/toys/unique-port.sh || exit 1 33 . sources/toys/unique-port.sh || exit 1
32 PORT=$(unique_port) 34 PORT=$(unique_port)
39 41
40 echo === Begin native build for $ARCH 42 echo === Begin native build for $ARCH
41 43
42 rm -f sources/system-image-"$ARCH"/hdb.img 44 rm -f sources/system-image-"$ARCH"/hdb.img
43 HDC="$HDCFILE" KERNEL_EXTRA="OUTPORT=$PORT ARCH=$ARCH" \ 45 HDC="$HDCFILE" KERNEL_EXTRA="OUTPORT=$PORT ARCH=$ARCH" \
44 sources/timeout.sh 60 ./run-from-build.sh "$ARCH" 46 $DO_TIMEOUT ./run-from-build.sh "$ARCH"
45 47
46 echo === End native build for $ARCH 48 echo === End native build for $ARCH