From a27b67a513ad2068067707243d48ac629ef577cd Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 22 Nov 2023 09:27:09 +0800
Subject: [PATCH 161/181] open ENABLE_GRPC_REMOTE_CONNECT in CI and bugfix for
 run.sh

Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
 CI/make-and-install.sh               | 4 ++--
 CI/pr-gateway.sh                     | 2 +-
 CI/test_cases/container_cases/run.sh | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh
index e714d206..08cc4520 100755
--- a/CI/make-and-install.sh
+++ b/CI/make-and-install.sh
@@ -106,9 +106,9 @@ rm -rf build
 mkdir build
 cd build
 if [[ ${enable_gcov} -ne 0 ]]; then
-  cmake -DLIB_INSTALL_DIR=${builddir}/lib -DCMAKE_INSTALL_PREFIX=${builddir} -DCMAKE_INSTALL_SYSCONFDIR=${builddir}/etc -DCMAKE_BUILD_TYPE=Debug -DGCOV=ON -DENABLE_EMBEDDED=ON -DENABLE_COVERAGE=ON -DENABLE_UT=ON -DENABLE_METRICS=ON -DENABLE_REMOTE_LAYER_STORE=ON ..
+  cmake -DLIB_INSTALL_DIR=${builddir}/lib -DCMAKE_INSTALL_PREFIX=${builddir} -DCMAKE_INSTALL_SYSCONFDIR=${builddir}/etc -DCMAKE_BUILD_TYPE=Debug -DGCOV=ON -DENABLE_EMBEDDED=ON -DENABLE_COVERAGE=ON -DENABLE_UT=ON -DENABLE_METRICS=ON -DENABLE_REMOTE_LAYER_STORE=ON -DENABLE_GRPC_REMOTE_CONNECT=ON ..
 else
-  cmake -DLIB_INSTALL_DIR=${builddir}/lib -DCMAKE_INSTALL_PREFIX=${builddir} -DCMAKE_INSTALL_SYSCONFDIR=${builddir}/etc -DENABLE_EMBEDDED=ON -DENABLE_METRICS=ON -DENABLE_REMOTE_LAYER_STORE=ON ..
+  cmake -DLIB_INSTALL_DIR=${builddir}/lib -DCMAKE_INSTALL_PREFIX=${builddir} -DCMAKE_INSTALL_SYSCONFDIR=${builddir}/etc -DENABLE_EMBEDDED=ON -DENABLE_METRICS=ON -DENABLE_REMOTE_LAYER_STORE=ON -DENABLE_GRPC_REMOTE_CONNECT=ON ..
 fi
 make -j $(nproc)
 make install
diff --git a/CI/pr-gateway.sh b/CI/pr-gateway.sh
index 8223ddf5..3dbdd887 100755
--- a/CI/pr-gateway.sh
+++ b/CI/pr-gateway.sh
@@ -112,7 +112,7 @@ pushd iSulad
 rm -rf build
 mkdir build
 pushd build
-cmake -DDEBUG=ON -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_UT=ON -DENABLE_REMOTE_LAYER_STORE=ON -DENABLE_SHIM_V2=OFF ../ || exit 1
+cmake -DDEBUG=ON -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_UT=ON -DENABLE_REMOTE_LAYER_STORE=ON -DENABLE_SHIM_V2=OFF -DENABLE_GRPC_REMOTE_CONNECT=ON ../ || exit 1
 make -j $(nproc) || exit 1
 ctest -V
 popd
diff --git a/CI/test_cases/container_cases/run.sh b/CI/test_cases/container_cases/run.sh
index 1dea51ab..80485457 100755
--- a/CI/test_cases/container_cases/run.sh
+++ b/CI/test_cases/container_cases/run.sh
@@ -29,7 +29,8 @@ function do_test_t()
 
     tid=$(isula run --name $containername  -td busybox)
     hostname=$(isula exec -it $containername hostname)
-    fn_check_eq "${hostname}" "${tid:0:12}" "default hostname is not id of container"
+    clean_hostname=$(echo "$hostname" | sed 's/[\x01-\x1F\x7F]//g')
+    fn_check_eq "${clean_hostname}" "${tid:0:12}" "default hostname is not id of container"
     isula exec -it $containername env | grep HOSTNAME
     fn_check_eq "$?" "0" "check HOSTNAME env failed"
     isula stop -t 0 $tid
-- 
2.42.0

