More clean-ups.
This commit is contained in:
parent
a1b35c44ac
commit
6d474175e2
|
@ -442,31 +442,6 @@ DEBUG echo _test_file_name="$_test_file_name"
|
||||||
DEBUG echo _base_dir="$_base_dir"
|
DEBUG echo _base_dir="$_base_dir"
|
||||||
DEBUG echo _dest_dir="$_dest_dir"
|
DEBUG echo _dest_dir="$_dest_dir"
|
||||||
|
|
||||||
|
|
||||||
if [ "$_simulation" ]
|
|
||||||
then
|
|
||||||
# When in simulation mode, we will just commit play (ignore other options)
|
|
||||||
_init=
|
|
||||||
_record=
|
|
||||||
_compare=
|
|
||||||
_remove_fail=
|
|
||||||
_play=
|
|
||||||
while read curline;
|
|
||||||
do
|
|
||||||
name_in_args "$curline" $*
|
|
||||||
_run_test=$(( $? + $_test_all ))
|
|
||||||
if [ $_run_test -ne 0 ]
|
|
||||||
then
|
|
||||||
do_simulation "$curline"
|
|
||||||
if [ $? -ne 0 ]
|
|
||||||
then
|
|
||||||
(( _n_exe_err++ ))
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done < "$_test_file_name"
|
|
||||||
# This will cause render simulation
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "$_base_dir" ]
|
if [ ! -e "$_base_dir" ]
|
||||||
then
|
then
|
||||||
echo "Base dir <$_base_dir> - not found."
|
echo "Base dir <$_base_dir> - not found."
|
||||||
|
@ -508,24 +483,16 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Here we clear all fail_*.txt files before running test
|
|
||||||
# because those files are opened with append ("a") mode.
|
if [ "$_simulation" ]
|
||||||
# We don't want to accumlate old tests fail text.
|
|
||||||
if [ "$_remove_fail" ]
|
|
||||||
then
|
then
|
||||||
if [ -z "$*" ]
|
# When in simulation mode, we will just commit play (ignore other options)
|
||||||
then
|
_init=
|
||||||
# Remove all file_*.txt files before init/play/record
|
_record=
|
||||||
DEBUG echo "removing fail_*.txt"
|
_compare=
|
||||||
rm fail_*.txt &> /dev/null
|
_remove_fail=
|
||||||
else
|
_play=
|
||||||
# Remove file_*.txt files before init/play/record
|
for_test_in_test_file_do do_simulation
|
||||||
for i in $*
|
|
||||||
do
|
|
||||||
DEBUG echo "removing fail_$i.txt"
|
|
||||||
rm fail_"$i".txt &> /dev/null
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_record" ]
|
if [ "$_record" ]
|
||||||
|
@ -544,20 +511,6 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_n_tests_failed=0
|
_n_tests_failed=0
|
||||||
if [ "$_remove_fail" ]
|
|
||||||
then
|
|
||||||
ls fail_*.txt &> /dev/null
|
|
||||||
if [ "$?" -eq 0 ]
|
|
||||||
then
|
|
||||||
_n_tests_failed=`ls fail_*.txt -1 | wc -l`
|
|
||||||
|
|
||||||
if [ "$_n_tests_failed" ]
|
|
||||||
then
|
|
||||||
echo "$_n_tests_failed tests had errors while running."
|
|
||||||
echo "Please examine fail_*.txt files in CWD"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add up total-error and emit user message.
|
# Add up total-error and emit user message.
|
||||||
total_errors=$(( $nfail + $nerr + $_n_tests_failed + $_n_exe_err ))
|
total_errors=$(( $nfail + $nerr + $_n_tests_failed + $_n_exe_err ))
|
||||||
|
|
Loading…
Reference in New Issue