16 Star 99 Fork 24

Gitee 极速下载/curve

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/opencurve/curve
克隆/下载
ut.sh 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
YunhuiChen 提交于 2023-11-20 19:16 . fix ut test bug
#!/usr/bin/env bash
# Copyright (C) 2021 Jingli Chen (Wine93), NetEase Inc.
############################ GLOBAL VARIABLES
g_os="debian11"
############################ BASIC FUNCTIONS
msg() {
printf '%b' "$1" >&2
}
success() {
msg "\33[32m[✔]\33[0m ${1}${2}"
}
die() {
msg "\33[31m[✘]\33[0m ${1}${2}"
exit 1
}
print_title() {
local delimiter=$(printf '=%.0s' {1..20})
msg "$delimiter [$1] $delimiter\n"
}
############################ FUNCTIONS
get_options() {
local args=`getopt -o ldorhS --long sanitizer:,stor:,list,dep:,only:,os:,release:,ci:,build_rocksdb: -n "$0" -- "$@"`
eval set -- "${args}"
while true
do
case "$1" in
-s|--stor)
g_stor=$2
shift 2
;;
-l|--list)
g_list=1
shift 1
;;
-d|--dep)
g_depend=$2
shift 2
;;
-o|--only)
g_target=$2
shift 2
;;
-r|--release)
g_release=$2
shift 2
;;
-c|--ci)
g_ci=$2
shift 2
;;
-S|--sanitizer)
g_san=$2
shift 2
;;
--os)
g_os=$2
shift 2
;;
--build_rocksdb)
g_build_rocksdb=$2
shift 2
;;
-h)
usage
exit 1
;;
--)
shift
break
;;
*)
exit 1
;;
esac
done
}
main() {
get_options "$@"
sudo docker run --rm -w /var/lib/jenkins/workspace/curve/curve_multijob/ -v /var/lib/jenkins:/var/lib/jenkins -v $(pwd):/var/lib/jenkins/workspace/curve/curve_multijob/ -e BUILD_NUMBER=$BUILD_NUMBER -v ${HOME}:${HOME} --user $(id -u ${USER}):$(id -g ${USER}) -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /etc/sudoers:/etc/sudoers:ro -v /etc/shadow:/etc/shadow:ro --ulimit core=-1 --privileged opencurvedocker/curve-base:build-$g_os bash util/ut_in_image.sh "$@"
}
############################ MAIN()
main "$@"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/curve.git
[email protected]:mirrors/curve.git
mirrors
curve
curve
master

搜索帮助