1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#!/bin/bash
SCRIPT=$1
TOP=..
export TOP
HTT_ERRORS=0
PFX=.
errors=0
set +e
COPY=0
ls *.htt >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
cp ../../test/*.txt .
cp ../../test/*.visual .
cp ../../test/*.ntlm .
cp ../../test/*.htt .
cp ../../test/*.hte .
cp ../../test/*.htb .
cp ../../test/*.pem .
cp ../../test/run.sh .
cp ../../macros/*.htb ../macros/.
PFX=../../test
COPY=1
fi
# start testing
echo
. $PFX/$SCRIPT
rm -f tmp.txt
if [ $COPY -ne 0 ]; then
rm -f .out.txt
rm -f *.log
rm -f *.txt
rm -f *.ntlm
rm -f *.visual
rm -f *.htt
rm -f *.hte
rm -f *.htb
rm -f *.pem
rm -f run.sh
rm -f ../macros/*.htb
fi
if [ $errors -gt 0 ]; then
echo "Failed"
exit 1
else
echo "Success"
exit 0
fi
|