Merge #8 tests/tzdata-checker: modify to resolve different glibcs zdump behavior

This commit is contained in:
Martin Cermak 2021-11-12 14:29:59 +00:00
commit e454a593c0

View File

@ -73,12 +73,13 @@ rlJournalStart
rlPhaseStartSetup "Test zdump"
for zone in `cat zones.int`; do
rlRun "./zdump -v -c 1970,$hiyear $zone >ref"
if uname -r | egrep -o -q '\.el5'; then # glibc's zdump is out of sync for RHEL5
if rlIsRHEL "<8"; then # glibc's zdump is out of sync for '-v option'
rlRun "./zdump -v -c 1970,$hiyear $zone >ref"
rlRun "./zdump -v -c 1970,$hiyear /usr/share/zoneinfo/$zone >cur"
sed -i 's|^/usr/share/zoneinfo/||' cur
else
rlRun "zdump -v -c 1970,$hiyear $zone >cur"
rlRun "./zdump -V -c 1970,$hiyear $zone >ref"
rlRun "zdump -V -c 1970,$hiyear $zone >cur"
fi
# normalize zdump outputs