Skip to content

Commit

Permalink
Update guest.test_executor.sh with proper indent
Browse files Browse the repository at this point in the history
  • Loading branch information
hongyuni authored and ysun committed Dec 21, 2023
1 parent a6ba181 commit 6ad9072
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions guest-test/guest.test_executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ EOF
return 1
fi
EOF
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ]; then
test_print_trc "Guest VM test source code and binary prepare complete"
return 0
else
return 1
fi
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ]; then
test_print_trc "Guest VM test source code and binary prepare complete"
return 0
else
return 1
fi
}

# function based on sshpass to execute $1 test_script.sh and potential $2 script params in Guest VM
Expand All @@ -77,12 +77,12 @@ guest_test_entry() {
test_print_trc "guest_test_entry args 2: $2"
./$1 $2
EOF
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ] || [ $ERR_NUM -eq 255 ]; then
return 0
else
return 1
fi
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ] || [ $ERR_NUM -eq 255 ]; then
return 0
else
return 1
fi
}

# function based on sshpass to close VM
Expand All @@ -92,13 +92,13 @@ guest_test_close() {
test_print_trc "guest test complete, close VM now"
systemctl reboot --reboot-argument=now
EOF
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ]; then
test_print_trc "Guest VM closed properly after test"
return 0
else
return 1
fi
ERR_NUM=$?
if [ $ERR_NUM -eq 0 ]; then
test_print_trc "Guest VM closed properly after test"
return 0
else
return 1
fi
}

###################### Do Works ######################
Expand All @@ -115,4 +115,4 @@ if [ "${BASH_SOURCE[0]}" -ef "$0" ]; then
# select specific "$FEATURE.test_executor.sh" by $FEATURE
"$FEATURE"/"$FEATURE".test_executor.sh || \
{ die "Failed on $TESTCASE of $FEATURE"; return 1; }
fi
fi

0 comments on commit 6ad9072

Please sign in to comment.