Olson tz database tests
Olson, Arthur David (NIH/NCI) [E]
olsona at dc37a.nci.nih.gov
Mon Jul 23 15:34:10 UTC 2007
The only thing I've got is the shell script below (known as "zgress"
locally).
--ado
#!/bin/sh
# Accept the names of two time zone package source directories (A and
B).
# Do a "make install" from each directory to temporary directories.
# Apply the created "zdump" programs to all the created binary data
files:
# the A zdump to the A data (yielding AA results)
# the A zdump to the B data (yielding AB results)
# the B zdump to the A data (yielding BA results)
# the B zdump to the B data (yielding BB results)
# Report on differences.
O=`basename "$0"`
case $# in
2) ;;
*) echo "$O: usage is $O atzsourcedir btzsourcedir" 1>&2
exit 1
;;
esac
T=/tmp/,zgress$$
trap 'rm -f -r $T*' 0 1 2 3 15
# Step 1: do "make"s for both the A and B versions
for pass in a b
do
( cd "$1"; make clean; make install TOPDIR=$T$pass ) || exit 1
shift
done
# Step 2: apply both the A and B zdumps to both the A and B data
for prog in a b
do
for data in a b
do
zdump=$T$prog/etc/zdump
zoneinfo=$T$data/etc/zoneinfo
$zdump -v `find $zoneinfo ! -type d -print | sort` 2>&-
|
sed "s@$zoneinfo/@@" > $T$prog$data
done
done
# Step 3: do comparisons
ls -l $T[ab][ab]
left=aa
for right in ab ba bb
do
diff $T$left $T$right | sed "s/^/$left vs. $right:/"
done
More information about the tz
mailing list