Use zsh in shebang consequently.
[grml-unittests.git] / grml-debootstrap / runit.sh
1 #!/bin/zsh
2
3 . $FRAMEWORK
4
5 CMDLINE="$CMDLINE_COMMON noprompt netscript=$URL_PREFIX:$COMMON_PORT/deploy.sh status=$URL_PREFIX:$STATUS_PORT/"
6 IMAGE=$(tempfile -d /dev/shm)
7 KVM_PARAMS="-hda $IMAGE"
8 TIMEOUT_TIME=180
9 TEST_NAME=grml-debootstrap
10 BAILOUT_CMD='rm -f $IMAGE ; kill -9 $TEST_PID 2>/dev/null'
11
12 # create sample image file
13 dd if=/dev/zero of=$IMAGE bs=1024 count=712000 2>/dev/null
14
15 # run the test (will create a bootable device
16 run_test
17 timeout
18 wait $KVM_PID
19
20 # start second kvm
21 kvm -vnc :0 -hda $IMAGE  &
22 TEST_PID=$!
23
24
25 wait $SERVER_PID
26 kill -9 $TEST_PID
27 rm -f $IMAGE
28