This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 010dab3e Add the commands of run tests (#33)
010dab3e is described below

commit 010dab3e3183e2bff3782f14be127e07c832e275
Author: Dan Wang <[email protected]>
AuthorDate: Mon Dec 4 10:52:21 2023 +0800

    Add the commands of run tests (#33)
    
    Add the commands of run tests for both English and Chinese docs.
---
 _docs/en/build/compile-by-docker.md   | 22 ++++++++++++++++++++--
 _docs/en/build/compile-from-source.md | 14 ++++++++++++++
 _docs/zh/build/compile-by-docker.md   | 22 ++++++++++++++++++++--
 _docs/zh/build/compile-from-source.md | 12 ++++++++++++
 4 files changed, 66 insertions(+), 4 deletions(-)

diff --git a/_docs/en/build/compile-by-docker.md 
b/_docs/en/build/compile-by-docker.md
index a694b0de..f86c70f7 100755
--- a/_docs/en/build/compile-by-docker.md
+++ b/_docs/en/build/compile-by-docker.md
@@ -10,7 +10,7 @@ version: master
 Pegasus encapsulates the building environments into [docker 
images](https://hub.docker.com/r/apache/pegasus/tags?page=1&name=env), you can 
build directly based on these environments.
 
 For example, you can use the image based on `Ubuntu 20.04`:
-```sh
+```bash
 docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
@@ -18,7 +18,17 @@ docker pull apache/pegasus:build-env-ubuntu2004
 
 Please refer to [Downloads](/docs/downloads) to fetch the sources under a 
directory (`/your/local/apache-pegasus-source`). Then run the following command:
 
-```sh
+If you want to run tests, you should build Pegasus by the following command:
+
+```bash
+docker run -v /your/local/apache-pegasus-source:/root/pegasus \
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build --test -c 
--clear_thirdparty -j $(nproc)"
+```
+
+If you want to build Pegasus without runing tests, just execute the following 
command:
+
+```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
            apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "cd /root/pegasus; ./run.sh build -c 
--clear_thirdparty -j $(nproc)"
@@ -26,6 +36,14 @@ docker run -v 
/your/local/apache-pegasus-source:/root/pegasus \
 
 The output of compilation will be placed under `build/latest/output/` of the 
source directory. It includes `bin`, `include` and `lib`.
 
+## Run tests
+
+```bash
+docker run -v /your/local/apache-pegasus-source:/root/pegasus \
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh test"
+```
+
 ## Packaging
 
 Package server binaries for deployment:
diff --git a/_docs/en/build/compile-from-source.md 
b/_docs/en/build/compile-from-source.md
index afeff673..74fcdcff 100755
--- a/_docs/en/build/compile-from-source.md
+++ b/_docs/en/build/compile-from-source.md
@@ -24,12 +24,26 @@ You can refer to the docker images to install dependencies 
and set environment v
 
 Please refer to [Downloads](/docs/downloads) to fetch the sources。
 
+If you want to run tests, you should build Pegasus by the following command:
+
+```bash
+./run.sh build --test -c --clear_thirdparty -j $(nproc)
+```
+
+If you want to build Pegasus without runing tests, just execute the following 
command:
+
 ```bash
 ./run.sh build -c --clear_thirdparty -j $(nproc)
 ```
 
 The output of compilation will be placed under `build/latest/output/` of the 
source directory. It includes `bin`, `include` and `lib`.
 
+## Run tests
+
+```bash
+./run.sh test
+```
+
 ## Packaging
 
 Package server binaries for development:
diff --git a/_docs/zh/build/compile-by-docker.md 
b/_docs/zh/build/compile-by-docker.md
index 6a438213..385103c1 100755
--- a/_docs/zh/build/compile-by-docker.md
+++ b/_docs/zh/build/compile-by-docker.md
@@ -12,7 +12,7 @@ Pegasus将编译环境封装至[Docker镜像](https://hub.docker.com/r/apache/pe
 
 比如,你可以使用基于`Ubuntu 20.04`的镜像:
 
-```sh
+```bash
 docker pull apache/pegasus:build-env-ubuntu2004
 ```
 
@@ -20,7 +20,17 @@ docker pull apache/pegasus:build-env-ubuntu2004
 
 
请先参考[下载文档](/docs/downloads)获取源码到某目录(`/your/local/apache-pegasus-source`)下。随后运行以下命令:
 
-```sh
+如果你想要执行测试程序,需要用如下命令来编译Pegasus:
+
+```bash
+docker run -v /your/local/apache-pegasus-source:/root/pegasus \
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh build --test -c 
--clear_thirdparty -j $(nproc)"
+```
+
+如果不需要执行测试程序,只是单纯想编译Pegasus,使用如下命令即可:
+
+```bash
 docker run -v /your/local/apache-pegasus-source:/root/pegasus \
            apache/pegasus:build-env-ubuntu2004 \
            /bin/bash -c "cd /root/pegasus; ./run.sh build -c 
--clear_thirdparty -j $(nproc)"
@@ -28,6 +38,14 @@ docker run -v 
/your/local/apache-pegasus-source:/root/pegasus \
 
 编译的结果会被放在项目根目录的`build/latest/output/`文件夹下,其中包含`bin`、`include`以及`lib`目录。
 
+## 执行测试程序
+
+```bash
+docker run -v /your/local/apache-pegasus-source:/root/pegasus \
+           apache/pegasus:build-env-ubuntu2004 \
+           /bin/bash -c "cd /root/pegasus; ./run.sh test"
+```
+
 ## 编译打包
 
 打包server端程序包,用于服务部署:
diff --git a/_docs/zh/build/compile-from-source.md 
b/_docs/zh/build/compile-from-source.md
index 2302673f..fac993c1 100755
--- a/_docs/zh/build/compile-from-source.md
+++ b/_docs/zh/build/compile-from-source.md
@@ -26,12 +26,24 @@ version: master
 
 请先参考[下载文档](/docs/downloads)获取源码。
 
+如果你想要执行测试程序,需要用如下命令来编译Pegasus:
+```bash
+./run.sh build --test -c --clear_thirdparty -j $(nproc)
+```
+
+如果不需要执行测试程序,只是单纯想编译Pegasus,使用如下命令即可:
 ```bash
 ./run.sh build -c --clear_thirdparty -j $(nproc)
 ```
 
 编译后输出会放在当前目录的`build/latest/output/`目录下,里面包含`bin`、`include`以及`lib`目录。
 
+## 执行测试程序
+
+```bash
+./run.sh test
+```
+
 ## 编译打包
 
 打包server端程序包,用于服务部署:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to