1 Star 0 Fork 0

Johnwu/nsq

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test.sh 753 Bytes
一键复制 编辑 原始数据 按行查看 历史
Matt Reiferson 提交于 2021-03-28 11:13 . *: fix test for standard sh
#!/bin/sh
set -e
GOMAXPROCS=1 go test -timeout 90s ./...
if [ "$GOARCH" = "amd64" ] || [ "$GOARCH" = "arm64" ]; then
# go test: -race is only supported on linux/amd64, linux/ppc64le,
# linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
GOMAXPROCS=4 go test -timeout 90s -race ./...
fi
# no tests, but a build is something
for dir in apps/*/ bench/*/; do
dir=${dir%/}
if grep -q '^package main$' $dir/*.go 2>/dev/null; then
echo "building $dir"
go build -o $dir/$(basename $dir) ./$dir
else
echo "(skipped $dir)"
fi
done
FMTDIFF="$(find apps internal nsqd nsqlookupd -name '*.go' -exec gofmt -d '{}' ';')"
if [ -n "$FMTDIFF" ]; then
printf '%s\n' "$FMTDIFF"
exit 1
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/johnwu/nsq.git
git@gitee.com:johnwu/nsq.git
johnwu
nsq
nsq
master

搜索帮助