small test enhancements

This commit is contained in:
Remzi Arpaci-Dusseau
2019-02-28 16:13:25 -06:00
parent 65bb676774
commit bb21cd1ad4

View File

@@ -82,7 +82,7 @@ run_and_check () {
exit 0 exit 0
fi fi
if (( $verbose == 1 )); then if (( $verbose == 1 )); then
echo "running test $testnum" echo -n -e "\e[33mrunning test $testnum: \e[0m"
cat $testdir/$testnum.desc cat $testdir/$testnum.desc
fi fi
run_test $testdir $testnum $verbose run_test $testdir $testnum $verbose
@@ -96,6 +96,9 @@ run_and_check () {
# echo "results: outcheck:$outcheck errcheck:$errcheck" # echo "results: outcheck:$outcheck errcheck:$errcheck"
if (( $rccheck == 0 )) && (( $outcheck == 0 )) && (( $errcheck == 0 )) && (( $othercheck == 0 )); then if (( $rccheck == 0 )) && (( $outcheck == 0 )) && (( $errcheck == 0 )) && (( $othercheck == 0 )); then
builtin echo -e "\e[32mtest $testnum: passed\e[0m" builtin echo -e "\e[32mtest $testnum: passed\e[0m"
if (( $verbose == 1 )); then
echo ""
fi
else else
if (( $rccheck == 1 )); then if (( $rccheck == 1 )); then
print_error_message $testnum $contrunning rc print_error_message $testnum $contrunning rc
@@ -172,6 +175,9 @@ if [[ ! -d tests-out ]]; then
mkdir tests-out mkdir tests-out
fi fi
# do a one-time setup step
# xxx
# run just one test # run just one test
if [[ $specific != "" ]]; then if [[ $specific != "" ]]; then
run_and_check $testdir $specific $contrunning $verbose 1 run_and_check $testdir $specific $contrunning $verbose 1