2 # Ensure that a command like
3 # `date --date="21:04 +0100" +%S' always prints `00'.
4 # Before coreutils-5.2.1, it would print the seconds from the current time.
6 if test "$VERBOSE" = yes; then
12 t0
=`echo "$0"|sed 's,.*/,,'`.tmp
; tmp
=$t0/$$
13 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
14 trap '(exit $?); exit $?' 1 2 13 15
17 mkdir
-p $tmp || framework_failure
=1
18 cd $tmp || framework_failure
=1
20 if test $framework_failure = 1; then
21 echo "$0: failure in testing framework" 1>&2
27 # It would be easier simply to sleep for two seconds between two runs
28 # of `date --date="21:04 +0100" +%S` and ensure that both outputs
29 # are `00', but I prefer not to sleep unconditionally. `make check'
30 # takes long enough as it is.
33 # See if the current number of seconds is `00' or just before.
41 # If necessary, wait for the system clock to pass the minute mark.
42 test $n = 0 ||
{ echo sleeping
for $n seconds...
; sleep $n; }
44 s
=`date --date="21:04 +0100" +%S`
50 (exit $fail); exit $fail