Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
761b03f1
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
761b03f1
编写于
7月 09, 2020
作者:
A
Alexander Kuzmenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add docker image for fuzzer
上级
47f05dca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
121 addition
and
0 deletion
+121
-0
docker/images.json
docker/images.json
+4
-0
docker/test/fuzzer/Dockerfile
docker/test/fuzzer/Dockerfile
+35
-0
docker/test/fuzzer/run-fuzzer.sh
docker/test/fuzzer/run-fuzzer.sh
+82
-0
未找到文件。
docker/images.json
浏览文件 @
761b03f1
...
...
@@ -31,6 +31,10 @@
"name"
:
"yandex/clickhouse-integration-test"
,
"dependent"
:
[]
},
"docker/test/fuzzer"
:
{
"name"
:
"yandex/clickhouse-fuzzer"
,
"dependent"
:
[]
},
"docker/test/performance-comparison"
:
{
"name"
:
"yandex/clickhouse-performance-comparison"
,
"dependent"
:
[]
...
...
docker/test/fuzzer/Dockerfile
0 → 100644
浏览文件 @
761b03f1
# docker build -t yandex/clickhouse-fuzzer .
FROM
ubuntu:18.04
ENV
LANG=C.UTF-8
ENV
TZ=Europe/Moscow
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
RUN
apt-get update
\
&&
DEBIAN_FRONTEND
=
noninteractive apt-get
install
--yes
--no-install-recommends
\
bash
\
ca-certificates
\
curl
\
gdb
\
git
\
libc6-dbg
\
moreutils
\
ncdu
\
p7zip-full
\
parallel
\
psmisc
\
rsync
\
tree
\
tzdata
\
vim
\
wget
\
&&
apt-get autoremove
--yes
\
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists/
*
COPY
* /
CMD
cd /workspace && /run-fuzzer.sh
# docker run --network=host --volume <workspace>:/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> yandex/clickhouse-fuzzer
docker/test/fuzzer/run-fuzzer.sh
0 → 100755
浏览文件 @
761b03f1
#!/bin/bash
set
-ex
set
-o
pipefail
trap
"exit"
INT TERM
trap
'kill $(jobs -pr) ||:'
EXIT
stage
=
${
stage
:-}
script_dir
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
# Doesn't work for clone stage, but should work after that
repo_dir
=
${
repo_dir
:-
$(
readlink
-f
"
$script_dir
/../../.."
)
}
function
clone
{
(
rm
-rf
ch
||
:
mkdir
ch
cd
ch
git init
git remote add origin https://github.com/ClickHouse/ClickHouse
git fetch
--depth
=
1 origin
"
$SHA_TO_TEST
"
# If not master, try to fetch pull/.../{head,merge}
if
[
"
$PR_TO_TEST
"
!=
"0"
]
then
git fetch
--depth
=
1 origin
"refs/pull/
$PR_TO_TEST
/*:refs/heads/pull/
$PR_TO_TEST
/*"
fi
git checkout
"
$SHA_TO_TEST
"
)
}
function
download
{
# wget -O- -nv -nd -c "https://clickhouse-builds.s3.yandex.net/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/performance/performance.tgz" \
# | tar --strip-components=1 -zxv
wget
-nv
-nd
-c
"https://clickhouse-builds.s3.yandex.net/
$PR_TO_TEST
/
$SHA_TO_TEST
/clickhouse_build_check/clang-10_debug_none_bundled_unsplitted_disable_False_binary/clickhouse"
}
function
configure
{
mkdir
db
||
:
cp
-av
"
$repo_dir
"
/programs/server/config
*
db
cp
-av
"
$repo_dir
"
/programs/server/user
*
db
cp
-av
"
$repo_dir
"
/tests/config db/config.d
}
function
fuzz
{
./clickhouse server
--config-file
db/config.xml
--
--path
db 2>&1 |
tail
-1000000
>
server-log.txt &
server_pid
=
$!
kill
-0
$server_pid
while
!
./clickhouse client
--query
"select 1"
&&
kill
-0
$server_pid
;
do
echo
.
;
sleep
1
;
done
./clickhouse client
--query
"select 1"
echo
Server started
for
f
in
$(
ls
ch/tests/queries/0_stateless/
*
.sql |
sort
-R
)
;
do
cat
$f
;
echo
';'
;
done
\
| ./clickhouse client
--query-fuzzer-runs
=
10 2>&1 |
tail
-1000000
>
fuzzer-log.txt
}
case
"
$stage
"
in
""
)
;
&
"clone"
)
time
clone
stage
=
download
time
ch/docker/test/fuzzer/run-fuzzer.sh
;;
"download"
)
time
download
;
&
"configure"
)
time
configure
;
&
"fuzz"
)
time
fuzz
;
&
"report"
)
;
&
esac
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录