Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Incubator Pegasus
提交
e0e329ad
Incubator Pegasus
项目概览
apache
/
Incubator Pegasus
通知
9
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Incubator Pegasus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
e0e329ad
编写于
5月 27, 2018
作者:
W
Wu Tao
提交者:
GitHub
5月 27, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
travis: add .travis.yml (#57)
上级
b17d3be6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
56 addition
and
4 deletion
+56
-4
.travis.yml
.travis.yml
+34
-0
rdsn
rdsn
+1
-1
run.sh
run.sh
+1
-1
src/server/test/CMakeLists.txt
src/server/test/CMakeLists.txt
+1
-1
src/server/test/main.cpp
src/server/test/main.cpp
+15
-0
src/server/test/pegasus_server_test_base.h
src/server/test/pegasus_server_test_base.h
+1
-1
src/server/test/run.sh
src/server/test/run.sh
+3
-0
未找到文件。
.travis.yml
0 → 100644
浏览文件 @
e0e329ad
sudo
:
required
dist
:
trusty
language
:
cpp
os
:
linux
compiler
:
-
gcc
before_install
:
-
wget https://raw.githubusercontent.com/xiaomi/pegasus-common/master/build-depends.tar.gz
-
tar xf build-depends.tar.gz
-
cd packages
-
ls | xargs sudo dpkg -i --force-depends
-
cd ..
install
:
-
sudo apt-get -f install
-
sudo apt-get -y install libsnappy-dev
before_script
:
-
cd rdsn/thirdparty
-
wget https://raw.githubusercontent.com/xiaomi/pegasus-common/master/pegasus-thirdparty-prebuild.tar.gz
-
tar xf pegasus-thirdparty-prebuild.tar.gz
-
rm -rf pegasus-thirdparty-prebuild.tar.gz
-
cd ../..
-
ulimit -c unlimited -S
script
:
-
./run.sh build && ./run.sh test
notifications
:
email
:
false
rdsn
@
9f5c4144
比较
f19ad49d
...
9f5c4144
Subproject commit
f19ad49dd37420f59f0e72f5bb70d4aaac04e3db
Subproject commit
9f5c4144a8f64d875f734b6f38f764855a4e941d
run.sh
浏览文件 @
e0e329ad
...
@@ -206,7 +206,7 @@ function run_test()
...
@@ -206,7 +206,7 @@ function run_test()
done
done
if
[
"
$test_modules
"
==
""
]
;
then
if
[
"
$test_modules
"
==
""
]
;
then
test_modules
=
"pegasus_rproxy_test pegasus_function_test"
test_modules
=
"pegasus_rproxy_test pegasus_function_test
pegasus_unit_test
"
fi
fi
./run.sh clear_onebox
#clear the onebox before test
./run.sh clear_onebox
#clear the onebox before test
...
...
src/server/test/CMakeLists.txt
浏览文件 @
e0e329ad
...
@@ -40,6 +40,6 @@ add_definitions(-DPEGASUS_UNIT_TEST)
...
@@ -40,6 +40,6 @@ add_definitions(-DPEGASUS_UNIT_TEST)
set
(
MY_BOOST_PACKAGES system filesystem
)
set
(
MY_BOOST_PACKAGES system filesystem
)
set
(
MY_BINPLACES config.ini
)
set
(
MY_BINPLACES config.ini
run.sh
)
dsn_add_executable
()
dsn_add_executable
()
src/server/test/main.cpp
浏览文件 @
e0e329ad
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
#include <dsn/service_api_cpp.h>
#include <dsn/service_api_cpp.h>
#include <dsn/dist/replication/replication_service_app.h>
#include <dsn/dist/replication/replication_service_app.h>
#include "server/pegasus_perf_counter.h"
#include "server/pegasus_server_impl.h"
std
::
atomic_bool
gtest_done
{
false
};
std
::
atomic_bool
gtest_done
{
false
};
class
gtest_app
:
public
::
dsn
::
replication
::
replication_service_app
class
gtest_app
:
public
::
dsn
::
replication
::
replication_service_app
...
@@ -29,6 +32,18 @@ GTEST_API_ int main(int argc, char **argv)
...
@@ -29,6 +32,18 @@ GTEST_API_ int main(int argc, char **argv)
{
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
testing
::
InitGoogleTest
(
&
argc
,
argv
);
// register perf counter.
dsn
::
tools
::
internal_use_only
::
register_component_provider
(
"pegasus::server::pegasus_perf_counter"
,
pegasus
::
server
::
pegasus_perf_counter_factory
,
::
dsn
::
PROVIDER_TYPE_MAIN
);
dsn
::
service_app
::
register_factory
<
gtest_app
>
(
"replica"
);
dsn
::
replication
::
replication_app_base
::
register_storage_engine
(
"pegasus"
,
dsn
::
replication
::
replication_app_base
::
create
<
pegasus
::
server
::
pegasus_server_impl
>
);
dsn
::
service_app
::
register_factory
<
gtest_app
>
(
"replica"
);
dsn
::
service_app
::
register_factory
<
gtest_app
>
(
"replica"
);
dsn_run_config
(
"config.ini"
,
false
);
dsn_run_config
(
"config.ini"
,
false
);
...
...
src/server/test/pegasus_server_test_base.h
浏览文件 @
e0e329ad
...
@@ -24,7 +24,7 @@ public:
...
@@ -24,7 +24,7 @@ public:
_gpid
=
dsn
::
gpid
(
100
,
1
);
_gpid
=
dsn
::
gpid
(
100
,
1
);
dsn
::
app_info
app_info
;
dsn
::
app_info
app_info
;
app_info
.
app_type
=
"
replica
"
;
app_info
.
app_type
=
"
pegasus
"
;
_replica
=
_replica
=
dsn
::
replication
::
create_test_replica
(
_replica_stub
,
_gpid
,
app_info
,
"./"
,
false
);
dsn
::
replication
::
create_test_replica
(
_replica_stub
,
_gpid
,
app_info
,
"./"
,
false
);
...
...
src/server/test/run.sh
0 → 100755
浏览文件 @
e0e329ad
#!/usr/bin/env bash
./pegasus_unit_test
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录