Test script is closed with error code 1 when errors exist

parent 8579ed14
......@@ -114,7 +114,7 @@ _31bytes=$_10bytes$_10bytes$_10bytes"0"
yeats="William Butler Yeats
He Wishes for the Cloths of Heaven
Had I the heavens embroidered cloths,
Had I the heaven's embroidered cloths,
Enwrought with golden and silver light,
The blue and the dim of the dark cloths
Of night and light and the half-light,
......@@ -303,6 +303,9 @@ start_of_use() {
fi
statement="Normal creates default vitis.conf"
if [[ -e $HOME/Vitis ]]; then
mv $HOME/Vitis $HOME/Vitis.temp.orig
fi
[[ -d $HOME/Vitis ]] && home_vitis_exists=TRUE || home_vitis_exists=FALSE
$vitis show D 2> /dev/null
if [[ -e "$CONF_PATH" ]]; then
......@@ -317,14 +320,17 @@ start_of_use() {
return_vitis_conf
rm -rf /tmp/Vitis/
if [[ -e $HOME/Vitis.temp.orig && ! -e $HOME/Vitis ]]; then
mv $HOME/Vitis.temp.orig $HOME/Vitis
fi
} # REQ 3.1
bad_vitis_path() {
$vitis service set path /Vitis $OPTCONF
$vitis service set path /dev/null/Vitis $OPTCONF
CMD="$vitis show D"
output=$($CMD $OPTCONF 2>&1)
expected="(Error) /Vitis/: this path is not available."
expected="(Error) /dev/null/Vitis/: this path is not available."
if [[ "$output" == "$expected" ]]; then
pass "${CMD}"
else
......@@ -3380,3 +3386,7 @@ main() {
show_results
}
main $@
if [[ $bad_cases -ne 0 ]]; then
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment