From b8715246767b64093526c096968dbb96a6eebd61 Mon Sep 17 00:00:00 2001 From: ilixiaocui Date: Fri, 16 Dec 2022 17:23:20 +0800 Subject: [PATCH] ci: fix curvbs buiild in ut.sh Signed-off-by: ilixiaocui --- ut.sh | 3 +-- util/build.sh | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ut.sh b/ut.sh index 7cc446dd9e..94589f3072 100644 --- a/ut.sh +++ b/ut.sh @@ -62,8 +62,7 @@ set -e #test_bin_dirs="bazel-bin/test/ bazel-bin/nebd/test/ bazel-bin/curvefs/test/" if [ $1 == "curvebs" ];then -make build stor=bs ci=1 dep=1 only=test/* -make build stor=bs ci=1 only=nebd/test/* +make build stor=bs ci=1 dep=1 test_bin_dirs="bazel-bin/test/ bazel-bin/nebd/test/" elif [ $1 == "curvefs" ];then make build stor=fs ci=1 dep=1 only=curvefs/test/* diff --git a/util/build.sh b/util/build.sh index 3f8d6d62f3..41fbccca9e 100644 --- a/util/build.sh +++ b/util/build.sh @@ -186,11 +186,13 @@ build_target() { g_build_opts+=("--config=gcc7-later") fi + alltarget=`get_target` if [ $g_ci -eq 1 ]; then g_build_opts+=("--collect_code_coverage") + alltarget=... fi - for target in `get_target` + for target in $alltarget do bazel build ${g_build_opts[@]} $target local ret="$?" @@ -215,7 +217,7 @@ build_target() { build_requirements() { - if [ "$g_stor" == "fs" ]; then + if [[ "$g_stor" == "fs" || $g_ci -eq 1 ]]; then kernel_version=`uname -r | awk -F . '{print $1 * 1000 + $2}'` if [ $kernel_version -gt 5001 ]; then g_build_opts+=("--define IO_URING_SUPPORT=1")