Bugfix: accelleration is divided twice
[Tachyon.git] / test / accellerate_float
1 #!/bin/bash
2
3 set -m
4
5 PATH=../src:$PATH
6
7 START_TIME=`date +%s`
8 ./sleep_float >sleep.tmp &
9 sleep 1
10 read a b c TACHYON_NAME <sleep.tmp
11 tachyon -a 20 $TACHYON_NAME
12 fg
13 END_TIME=`date +%s`
14 duration=$(($END_TIME - $START_TIME))
15 echo "Elapsed time is $duration"
16 cat sleep.tmp
17
18 if [[ $duration -eq 2 ]] || [[ $duration -eq 3 ]]
19 then
20    echo "Elapsed time within 3 seconds"
21    exit 0
22 fi
23 echo "Elapsed time $duration seconds is unexpected."
24 exit 1