Skip to content

Commit

Permalink
[guest-test] Test Enhance: revise for code check
Browse files Browse the repository at this point in the history
revise for code check

[Test Components] guest-test
[Test Types] any
[Supported Devices] all-generic

Signed-off-by: Hongyu Ning <[email protected]>
  • Loading branch information
hongyuni authored and ysun committed Jan 19, 2024
1 parent fd51c1e commit ed1c6ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guest-test/guest.test_executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ guest_test_prepare() {
mkdir $GUEST_TEST_DIR
EOF
sshpass -e scp -P "$PORT" -o StrictHostKeyChecking=no common.sh root@localhost:"$GUEST_TEST_DIR"
if [ -f $1 ]; then
if [ -f "$1" ]; then
sshpass -e scp -P "$PORT" -o StrictHostKeyChecking=no "$1" root@localhost:"$GUEST_TEST_DIR"
fi
test_print_trc "Guest VM test script prepare complete"
}

# function based on sshpass to scp $1 source_code_dir and compile $2 test_binary in Guest VM
guest_test_source_code() {
BASE_DIR=$(basename $1)
BASE_DIR=$(basename "$1")
SRC_DIR="$BASE_DIR"_temp
sshpass -e ssh -p "$PORT" -o StrictHostKeyChecking=no root@localhost << EOF
mkdir -p $GUEST_TEST_DIR/$SRC_DIR
Expand Down

0 comments on commit ed1c6ac

Please sign in to comment.