PostgreSQL regress test

本文介绍了PostgreSQL的regress测试,包括启动测试、测试模式、结果判断和创建自定义测试用例的方法。通过执行sql脚本并与预期结果进行diff比较来验证测试是否成功,同时强调了使用时需要注意的端口占用和数据库集群状态问题。
摘要由CSDN通过智能技术生成

PostgreSQL regress test

最近看了下pg中的回归测试相关内容,现在将看到的内容记录下来。

1.      先来一个例子

[postgres@gorilla1 regress]$ make check
make -C ../../../src/port all
make[1]: Entering directory `/tmp/postgresql-9.3.4/src/port'
make -C ../backend submake-errcodes
make[2]: Entering directory `/tmp/postgresql-9.3.4/src/backend'
make[2]: Nothing to be done for `submake-errcodes'.
make[2]: Leaving directory `/tmp/postgresql-9.3.4/src/backend'
make[1]: Leaving directory `/tmp/postgresql-9.3.4/src/port'
make -C ../../../src/common all
make[1]: Entering directory `/tmp/postgresql-9.3.4/src/common'
make -C ../backend submake-errcodes
make[2]: Entering directory `/tmp/postgresql-9.3.4/src/backend'
make[2]: Nothing to be done for `submake-errcodes'.
make[2]: Leaving directory `/tmp/postgresql-9.3.4/src/backend'
make[1]: Leaving directory `/tmp/postgresql-9.3.4/src/common'
rm -rf ./testtablespace
mkdir ./testtablespace
../../../src/test/regress/pg_regress --inputdir=. --temp-install=./tmp_check --top-builddir=../../..   --dlpath=.  --schedule=./parallel_schedule   
============== creating temporary installation        ==============
============== initializing database system           ==============
============== starting postmaster                    ==============
running on port 57536 with PID 2843
============== creating database "regression"         ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries        ==============
test tablespace               ... ok
parallel group (18 tests):  boolean char name varchar oid int2 int4 float4 text float8 int8 txid enum money bit uuid numeric rangetypes
     boolean                  ... ok
     char                     ... ok
     name                     ... ok
     varchar                  ... ok
     text                     ... ok
     int2                     ... ok
     int4                     ... ok
     int8                     ... ok
     oid                      ... ok
     float4                   ... ok
     float8                   ... ok
     bit                      ... ok
     numeric                  ... ok
     txid                     ... ok
     uuid                     ... ok
     enum                     ... ok
     money                    ... ok
     rangetypes               ... ok
test strings                  ... ok
test numerology               ... ok
parallel group (19 tests):  point lseg box path circle abstime time polygon date timetz interval tinterval inet reltime macaddr comments tstypes timestamptz timestamp
     point                    ... ok
     lseg                     ... ok
     box                      ... ok
     path                     ... ok
     polygon                  ... ok
     circle                   ... ok
     date                     ... ok
     time                     ... ok
     timetz                   ... ok
     timestamp                ... ok
     timestamptz              ... ok
     interval                 ... ok
     abstime         
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值