validation design improved
This commit is contained in:
parent
33b8c0996a
commit
f1421dcaae
|
@ -23,7 +23,7 @@ function do_single()
|
|||
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
|
||||
cat "$1/output" | substitute_constants | diff -NB "${2}/${TESTNAME}.status" - >"${2}/${TESTNAME}.diff" || true
|
||||
cat "$1/output" | substitute_constants | diff -NB - "${2}/${TESTNAME}.status" >"${2}/${TESTNAME}.diff" || true
|
||||
rm "${2}/${TESTNAME}.status"
|
||||
fi
|
||||
cp "$1/description" "${2}/${TESTNAME}.desc"
|
||||
|
@ -41,18 +41,18 @@ function do_series()
|
|||
find "$VALIDATE_TEST_CASES_DIR/$1" -type d -maxdepth 1 -mindepth 1 | grep -v "/\.[^/]*$" | sort | while read a
|
||||
do do_single "$a" "$VALIDATE_REPORT_DIR/$1"
|
||||
done
|
||||
create_summary "$VALIDATE_REPORT_DIR/$1" >"$VALIDATE_REPORT_DIR/$1/summary.html"
|
||||
create_summary "$1" >"$VALIDATE_REPORT_DIR/summary-$1.html"
|
||||
}
|
||||
|
||||
|
||||
function create_summary()
|
||||
# parameter: directory of results
|
||||
# parameter: name of test series
|
||||
{
|
||||
cat "$VALIDATE_SUMMARY_TEMPLATE_DIR/header"
|
||||
find "$1" -type f -name \*.desc -maxdepth 1 | sort | while read a
|
||||
find "$VALIDATE_REPORT_DIR/$1" -type f -name \*.desc -maxdepth 1 | sort | while read a
|
||||
do TESTNAME=$(basename ${a%.desc})
|
||||
TESTDESCRIPTION=$(cat $a)
|
||||
sed "s#_TESTNAME_#$TESTNAME#g; s/_TESTDESCRIPTION_/$TESTDESCRIPTION/" "$VALIDATE_SUMMARY_TEMPLATE_DIR/single_header"
|
||||
sed "s#_TESTSERIES_#$1#g; s#_TESTNAME_#$TESTNAME#g; s/_TESTDESCRIPTION_/$TESTDESCRIPTION/" "$VALIDATE_SUMMARY_TEMPLATE_DIR/single_header"
|
||||
local DIFF_FILE=${a%.desc}.diff
|
||||
if [ -s "$DIFF_FILE" ]
|
||||
then cat "$VALIDATE_SUMMARY_TEMPLATE_DIR/result-error"
|
||||
|
@ -92,7 +92,7 @@ function import_style()
|
|||
|
||||
function substitute_constants()
|
||||
{
|
||||
sed "s/_HOST_IP_DEFAULT_/$VALIDATE_HOST_IP_DEFAULT/g; s/_VALIDATE_HOST_IP_CHANGED_/$VALIDATE_HOST_IP_CHANGED/g"
|
||||
sed "s/_HOST_IP_DEFAULT_/$VALIDATE_HOST_IP_DEFAULT/g; s/_HOST_IP_CHANGED_/$VALIDATE_HOST_IP_CHANGED/g"
|
||||
}
|
||||
|
||||
##################### main ###########################
|
||||
|
|
Loading…
Reference in New Issue