Commit Graph

134 Commits

Author SHA1 Message Date
wangpenga a477f4a463 fix: 处理单元测试脚本的返回值
单元检测生成的asan log不管是否存在,返回数值都要是0。
原来log不存在会判断失败返回非0导致CI运行失败。

Log:
Change-Id: Ice7d761f2ac510f4177dda4fe785c914659eb756
2021-06-24 13:23:56 +08:00
wangpenga 2d5709771f fix: Renaming a nonexistent file will report an error
单元检测的日志文件不存在不要重命名,存在则重命名,不存在重命名会报错,没有检测到内存泄露的时候就会不存在。

Log:
Change-Id: If80ce3f31283dbafe13a5cd0a830eab06de65096
2021-06-21 13:27:07 +08:00
wangpenga 5712b5f618 fix: unit test memory leak.
修复单元测试中的内存泄露。

Log:
Change-Id: I42404a332a90f2f5b58d2532299f1b01351f291c
2021-06-18 15:01:38 +08:00
wangpenga d687492fb0 fix: unit test memory leak check failed due to AddressSanitizer.
添加参数使得内存检测的误报不影响单元测试结果生成。
环境变量和编译参数要配合使用。

Log:
Change-Id: Ib147d431d1af6a8ffd3e07d0b6d4ce68f7ebf46f
2021-06-11 18:00:43 +08:00
wangpenga 165f48e647 fix: Add memory leak detection parameters
添加内存泄露检测参数,修复可能发生的内存泄露

Log:
Change-Id: I6fb914c456e2b16338a15d9afd55ab5e9c0ab98d
2021-05-27 13:38:59 +08:00
ck 511d1dd7b1 fix: tests project qmake error
test_case.pro移动到dtkcommon中,此处改为load

Log: 修复测试工程qmake报错问题
Change-Id: I829b52aa6fd790160dbc8c13b87a7e5581f77aa5
(cherry picked from commit c9afef2265b5297794c9229552416130047402a5)
2021-04-26 17:47:15 +08:00
ck 0f18bcc89c fix: logfile path bugs
1.root应用如果HOME环境变量没有设置时,默认获取到的缓存路径变成/.cache,添加判断rootpath==homepath则不初始化日志路径
2.主动设置日志路径时如果为目录路径(existed),则警告后什么都不做

Log: 修复日志路径的问题
Change-Id: I2302c605e5e51c168bf7938a447f30459f83e1d3
2021-04-08 10:38:01 +08:00
sunkang b9205142b7 feat: 适配多版本合并(移除冲突添加依赖)
1. 移除prf文件,全部移动到libdtkcommon包中
2. 移除cmake文件夹中的文件,移动到libdtkcommon包中
3. 移除src/com.deepin.dtk.gschema.xml文件,移动到libdtkcommon包中
4. 修改control文件,添加依赖libdtkcommon包

Log: dtkcore多版本前的适配版本(移除冲突)
Change-Id: Iac4310cef55ab2bf31478e905d751aa121fb4078
2021-03-01 19:39:05 +08:00
ck c201deca55 chore: test.pro 微调
将平台相关代码放到一个合集中,删除注释的部分

Log: test工程文件微调
Change-Id: Ia29653175f1983c514b938a98390374ddbe5f247
2021-03-01 13:56:28 +08:00
ck 8c740058a1 refactor: 调整单元测试结构
将多个项目合并成一个,threadutils改成gtest

Log: 单元测试结构调整
Change-Id: I211e046f70510c299f0fc61538407956f3ea62ce
2021-02-26 17:44:40 +08:00
ck 364b5dd712 chore: 单元测试的类名修改
规范单元测试类名

Log: 规范单元测试类名
Change-Id: Idbad6605b0d872171b1d519f6a2f10e04cdb29ff
2021-02-25 19:01:04 +08:00
ck 6387d4a142 feat: add ut for dsysinfo
给os-version部分添加单元测试

Log: UT新增
Change-Id: Ic64c9640ede26cc79d316675c2f1032cae85301c
2021-02-24 11:55:28 +08:00
chengyulong 43bbdcb068 feat: 增加单元测试覆盖率
增加lcov计算单元测试覆盖率。

Log: 增加lcov计算单元测试覆盖率
Change-Id: Ic9a7b344821ad4321de2c50624f852049d450761
2021-02-02 09:34:02 +08:00
zccrs e8240c6daa feat: DVtableHook support std::function
增加对匿名函数和经过std::bind加工之后的函数的支持

Log:
Change-Id: I466f383aed635b50bdf31fa7b5689d5691e2a03b
2020-12-17 17:44:20 +08:00
ck 9832f0bacd fix: vtablehook failed
直接写死pagesize=4096在部分龙芯上会导致hook失败,具体现象是设置了缩放却无效,DHighDpi::init中hook失败导致.改成之前的做法根据pagesize来hook, 飞腾崩溃的原因是由于将qpa的本来可以写的地址改成了只读导致new对象时崩溃.增加从/proc/self/maps读取指针所在位置的读写权限,改完之后再改回来(只关注读写,其它权限可能会丢失,vtab处应该也不会有其它权限)

Log: 修复部分机器hook失败的问题
Change-Id: Ibe2296ebdf1673f3e33bff40aae3b284cc0d77c1
2020-12-17 17:19:35 +08:00
liuyang b975e0ba38 feat: 打包可以触发单元测试
qmake添加testcase,并在构建时添加指令make-check,打包时可以自动触发进行单元测试

Log: 打包时触发单元测试
Change-Id: Ic02f8893974abe2e2689e412ba0b29b86b56db0c
2020-11-19 10:48:24 +08:00
liuyang 639abdd14e feat: 添加GTest测试单元
QTest替换为GTest,包括dvtablehook、dutils、ddesktopentry

Log: 添加GTest测试

Change-Id: I86e24ed4bca065d5f01509aed15fb29ee5dd9f72
2020-11-12 15:39:54 +08:00
zccrs ca1e23ddfb refactor: DThreadUtils添加一些函数重载
调用时支持关联到一个QObject对象,当此对象被销毁时不调用槽函数
对部分接口添加了单元测试

Change-Id: Ife6264a17e8a8f1325cd21a0ca01f0af177ac762
Reviewed-on: http://gerrit.uniontech.com/c/dtkcore/+/2083
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-08-15 17:55:25 +08:00
ck 523a51ab69 feat: os-version 系统识别方案新接口
根据系统识别方案实现新的接口

Log: 系统识别方案新接口
Task: https://pms.uniontech.com/zentao/task-view-30524.html
Change-Id: I9e1b95a0e85d40c97164b2dd95090bd1d4abf2f9
Reviewed-on: http://gerrit.uniontech.com/c/dtkcore/+/506
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: chenke <chenke@uniontech.com>
Reviewed-by: zhangjide <zhangjide@uniontech.com>
Tested-by: <mailman@uniontech.com>
2020-07-24 01:09:36 +00:00
Gary Wang 57fc346a46 license: switch to LGPLv3 license 2020-04-24 14:44:07 +08:00
Gary Wang 7381384540 fix: parse error with some desktop files 2020-02-03 14:21:12 +08:00
zccrs d75ecdd05e feat: support override global vtable of class
add test for DVtableHook interface
2020-01-01 12:24:40 +08:00
张丁元 0dc0efd248 fix: build failed on MacOS 2019-12-10 10:22:12 +08:00
Iceyer 1fd094c04a docs: add docs for DStandardPaths
Change-Id: I4c16cb80a8b90401d6c1812a7aa5e0e1dbac12e2
2018-10-30 15:40:17 +08:00
石博文 32044b1219 Add: DDBusSender class is useful tools to make a dbus call
Change-Id: If5a83586dea9ce46fb3cbbb6756083712bdc3528
2018-03-29 08:10:12 +00:00
Iceyer c876180f53 feat: add group interface for DSettingsGroup
Change-Id: Iba5963b4d5f4b3dc28ac00b4d57a2f5c97c5defd
2018-02-28 14:51:08 +08:00
Iceyer 99886406a0 fix: better static lib support
Change-Id: I13c0588a79d8ec66ee5a6d62c28de6341e6f7127
2018-02-13 01:14:37 +08:00
石博文 198b958acf Add a mathmatic unit conver tools to format numbers.
Change-Id: Ie01377598ec64efb64a3a7df7df7ac0615020ac4
2018-01-16 13:45:16 +08:00
Iceyer af04bbe193 fix: make macosx build success
Change-Id: Ib7ade26e3ce873111f654b8480a864df4a013459
2017-11-24 19:17:05 +08:00
Iceyer 66c4c812eb fix: windows build failed
Change-Id: Ie4df47e550a3c42552e1067ca7059e3369258825
2017-11-24 17:33:17 +08:00
Iceyer b94b97b145 feat: create gsettingsbackend
Change-Id: I6ed1ef01205c31814f53a427e84b8b24fe96a7a6
2017-10-24 10:19:05 +08:00
Iceyer a2624cebd5 Update license
Change-Id: I9a1ab231ee77a9f040a94a07d2c06e6c7a1b0ecd
2017-09-14 15:22:38 +08:00
Iceyer ba9f460f71 Fix cannot run test by make check
Change-Id: Ife192a0e5b9022ba68bee5185c80fe8bfd2721b9
2017-08-18 14:43:37 +08:00
Iceyer 3925beaf37 Add tests
Change-Id: Ibcd2de8c0346bb0ad31555de392eaac7965bf3bc
2017-08-03 11:54:58 +08:00