From ed1c6ac53abb77dbf6e671bdedb953847e36f561 Mon Sep 17 00:00:00 2001 From: Hongyu Ning Date: Wed, 10 Jan 2024 11:41:17 +0800 Subject: [PATCH] [guest-test] Test Enhance: revise for code check revise for code check [Test Components] guest-test [Test Types] any [Supported Devices] all-generic Signed-off-by: Hongyu Ning --- guest-test/guest.test_executor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guest-test/guest.test_executor.sh b/guest-test/guest.test_executor.sh index aeaf36e2..490e0eea 100755 --- a/guest-test/guest.test_executor.sh +++ b/guest-test/guest.test_executor.sh @@ -32,7 +32,7 @@ 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" @@ -40,7 +40,7 @@ EOF # 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