4487. [test] Make system tests work on Windows. [RT #42931]

This commit is contained in:
Witold Krecicki
2016-10-19 17:18:42 +02:00
parent 17697000bc
commit cc51cd2d20
273 changed files with 9139 additions and 559 deletions

View File

@@ -28,7 +28,7 @@ rolling=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < rolling.key`
standby=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < standby.key`
zsk=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < zsk.key`
../../../tools/genrandom 400 $RANDFILE
$GENRANDOM 400 $RANDFILE
echo "I:signing zones"
$SIGNER -Sg -o $czone $cfile > /dev/null 2>&1
@@ -137,16 +137,22 @@ if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking warning about permissions change on key with dnssec-settime ($n)"
ret=0
# settime should print a warning about changing the permissions
chmod 644 `cat oldstyle.key`.private
$SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
grep "warning" tmp.out > /dev/null 2>&1 || ret=1
$SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
grep "warning" tmp.out > /dev/null 2>&1 && ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
if [ `uname -o` == Cygwin ]; then
echo "I: Cygwin detected, skipping"
else
ret=0
# settime should print a warning about changing the permissions
chmod 644 `cat oldstyle.key`.private
$SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
grep "warning" tmp.out > /dev/null 2>&1 || ret=1
cat tmp.out
$SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
grep "warning" tmp.out > /dev/null 2>&1 && ret=1
cat tmp.out
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
fi
echo "I:checking warning about delete date < inactive date with dnssec-settime ($n)"
ret=0