##// END OF EJS Templates
tests: print the actual timeout value used in `wait-on-file`...
Matt Harbison -
r52840:9cfc95e9 default
parent child Browse files
Show More
@@ -11,14 +11,17 fi
11
11
12 timer="$1"
12 timer="$1"
13
13
14 # Scale the timeout to match the sleep steps below, i.e. 1/0.02.
15 timer=$(( 50 * $timer ))
16 # If the test timeout have been extended, also scale the timer relative
14 # If the test timeout have been extended, also scale the timer relative
17 # to the normal timing.
15 # to the normal timing.
18 if [ "$HGTEST_TIMEOUT_DEFAULT" -lt "$HGTEST_TIMEOUT" ]; then
16 if [ "$HGTEST_TIMEOUT_DEFAULT" -lt "$HGTEST_TIMEOUT" ]; then
19 timer=$(( ( $timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
17 timer=$(( ( $timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
20 fi
18 fi
21
19
20 max_time=$timer
21
22 # Scale the timeout to match the sleep steps below, i.e. 1/0.02.
23 timer=$(( 50 * $timer ))
24
22 wait_on="$2"
25 wait_on="$2"
23 create=""
26 create=""
24 if [ $# -eq 3 ]; then
27 if [ $# -eq 3 ]; then
@@ -34,6 +37,6 while [ "$timer" -gt 0 ] && !([ -e "$wai
34 sleep 0.02
37 sleep 0.02
35 done
38 done
36 if [ "$timer" -le 0 ]; then
39 if [ "$timer" -le 0 ]; then
37 echo "file not created after $1 seconds: $wait_on" >&2
40 echo "file not created after $max_time seconds: $wait_on" >&2
38 exit 1
41 exit 1
39 fi
42 fi
General Comments 0
You need to be logged in to leave comments. Login now