validation improved
error and warning macros fixed
This commit is contained in:
parent
bf29c216f5
commit
00066a317b
6 changed files with 31 additions and 17 deletions
|
@ -78,7 +78,7 @@ function qemu_boot()
|
|||
{
|
||||
if [ ! -e "$HD_IMAGE" ]
|
||||
then echo "Creating temporary harddisk image ..."
|
||||
dd if=/dev/zero of="$HD_IMAGE" bs=1M count=5
|
||||
dd if=/dev/zero of="$HD_IMAGE" bs=1M count=20
|
||||
fi
|
||||
echo "Starting qemu ..."
|
||||
qemu -cdrom "$IMAGEFILE" -m 64 -hda "$IMAGEFILE" -boot d -n misc/qemu-ifup || true
|
||||
|
|
|
@ -218,10 +218,11 @@ function umount_crypto()
|
|||
{
|
||||
# do not break on error
|
||||
set +e
|
||||
# thttpd removes PATH for cgis
|
||||
/etc/init.d/samba stop
|
||||
ps -e | grep -q " samba$" && killall samba
|
||||
ps -e | grep -q " samba$" && killall -9 samba
|
||||
ps -e | grep -q " smbd$" && killall smbd
|
||||
ps -e | grep -q " nmbd$" && killall nmbd
|
||||
ps -e | grep -q " smbd$" && killall -9 smbd
|
||||
ps -e | grep -q " nmbd$" && killall -9 nmbd
|
||||
umount "$CRYPTO_DIR"
|
||||
$CRYPTSETUP remove "$CRYPTMAPPER_DEV"
|
||||
set -e
|
||||
|
|
|
@ -28,11 +28,14 @@ function do_single()
|
|||
{
|
||||
local TESTNAME=$(basename $1)
|
||||
curl --insecure --silent --output "${2}/${TESTNAME}.html" --config "$1/input.curl"
|
||||
[ -e "${2}/${TESTNAME}.html" ] && sed "1,/CBOX-STATUS-begin/d; /CBOX-STATUS-end/,\$d" "${2}/${TESTNAME}.html" >"${2}/${TESTNAME}.status"
|
||||
# the diff option "-B" is required, because the status output of
|
||||
# the cryptobox.pl script contains some blank lines
|
||||
diff -NB "${2}/${TESTNAME}.status" "$1/output" >"${2}/${TESTNAME}.diff" || true
|
||||
rm "${2}/${TESTNAME}.status"
|
||||
# there is no status in certain cases - e.g. for error 404
|
||||
if [ -e "${2}/${TESTNAME}.html" ]
|
||||
then sed "1,/CBOX-STATUS-begin/d; /CBOX-STATUS-end/,\$d" "${2}/${TESTNAME}.html" >"${2}/${TESTNAME}.status"
|
||||
# the diff option "-B" is required, because the status output of
|
||||
# the cryptobox.pl script contains some blank lines
|
||||
diff -NB "${2}/${TESTNAME}.status" "$1/output" >"${2}/${TESTNAME}.diff" || true
|
||||
rm "${2}/${TESTNAME}.status"
|
||||
fi
|
||||
cp "$1/description" "${2}/${TESTNAME}.desc"
|
||||
}
|
||||
|
||||
|
@ -47,7 +50,7 @@ function do_series()
|
|||
done
|
||||
create_summary "$REPORT_DIR/$1" >"$REPORT_DIR/$1/summary.html"
|
||||
tar czf "$REPORT_DIR/${1}-results.tar.gz" -C "$REPORT_DIR" "$1"
|
||||
echo "$REPORT_DIR/${1}-results.tar.gz"
|
||||
#echo "$REPORT_DIR/${1}-results.tar.gz"
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,12 +68,12 @@ create_summary()
|
|||
sed 's#$#<br/>#' "$DIFF_FILE"
|
||||
else cat "$SUMMARY_TEMPLATE_DIR/result-ok"
|
||||
echo "no differences found"
|
||||
# remove empty diff
|
||||
[ -e "$DIFF_FILE" ] && rm "$DIFF_FILE"
|
||||
fi
|
||||
cat "$SUMMARY_TEMPLATE_DIR/single_footer"
|
||||
# remove description file
|
||||
rm "$a"
|
||||
# remove if empty
|
||||
[ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE" ] && rm "$DIFF_FILE"
|
||||
done
|
||||
cat "$SUMMARY_TEMPLATE_DIR/footer"
|
||||
}
|
||||
|
@ -91,10 +94,21 @@ case "$ACTION" in
|
|||
[ ! -d "$CASE_DIR" ] && error_die 2 "the test case was not found ($CASE_DIR)!"
|
||||
do_series "$2"
|
||||
;;
|
||||
check_all )
|
||||
"$0" list | sort | while read a
|
||||
do echo -n "Validating $a ..."
|
||||
"$0" check "$a"
|
||||
echo
|
||||
echo -n "Waiting 20 seconds ..."
|
||||
sleep 20
|
||||
echo
|
||||
done
|
||||
;;
|
||||
* )
|
||||
echo "Syntax of $(basename $0)"
|
||||
echo -e "\t list \t\t - show a list of available test cases"
|
||||
echo -e "\t check NAME \t - execute a test case - if successful the filename of the report is printed"
|
||||
echo -e "\t check NAME \t - execute a test case"
|
||||
echo -e "\t check_all \t - execute all test cases"
|
||||
echo -e "\t help \t\t - this syntax information"
|
||||
echo
|
||||
;;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
if:(name(item) == errname)
|
||||
?><div class="error">
|
||||
<h1><?cs var:item.Title ?></h1>
|
||||
<p><?cs var:item.Text ?></p>
|
||||
<p><?cs var:item.Text ?></p></div>
|
||||
<?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
|
@ -27,7 +27,7 @@
|
|||
if:(name(item) == succname)
|
||||
?><div class="success">
|
||||
<h1><?cs var:item.Title ?></h1>
|
||||
<p><?cs var:item.Text ?></p>
|
||||
<p><?cs var:item.Text ?></p></div>
|
||||
<?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
|
|
|
@ -84,7 +84,6 @@ sub get_available_languages()
|
|||
close(DIR);
|
||||
|
||||
foreach $file (@files) {
|
||||
warn "$file";
|
||||
$hdf = ClearSilver::HDF->new();
|
||||
$hdf->readFile("$LANGUAGE_DIR/$file");
|
||||
substr($file, -4) = "";
|
||||
|
|
|
@ -97,7 +97,7 @@ body {
|
|||
}
|
||||
|
||||
#words {
|
||||
width: 570px;
|
||||
width: 565px;
|
||||
padding: 1.1em 0em 1.1em 1.1em;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue